Skip to content

Commit

Permalink
Add Amon's Reach race swap
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziktofel committed Nov 26, 2024
1 parent 47f7cca commit d8f5d2f
Show file tree
Hide file tree
Showing 10 changed files with 6,580 additions and 6,275 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Components>
<Optimized/>
<DataComponent Type="gada">GameData</DataComponent>
<DataComponent Type="text" Locale="enUS">GameText</DataComponent>
<DataComponent Type="info">DocumentInfo</DataComponent>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ void gf_CreateUnitforWarpConduit (string lp_unitType, point lp_createPoint);
//--------------------------------------------------------------------------------------------------
// Trigger Variables
//--------------------------------------------------------------------------------------------------
trigger gt_FactionSwapInit;
trigger gt_onDifficultyCasual;
trigger gt_onDifficultyNormal;
trigger gt_onDifficultyHard;
Expand Down Expand Up @@ -1358,6 +1359,46 @@ bool auto_gf_CreateUnitforWarpConduit_TriggerFunc (bool testConds, bool runActio
return true;
}

//--------------------------------------------------------------------------------------------------
// Trigger: Faction Swap Init
//--------------------------------------------------------------------------------------------------
bool gt_FactionSwapInit_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}

if ((libABFE498B_gv_aP_Triggers_Option_overridePlayerRace == "Neut")) {
lib15EF4C78_gf_RemoveUnusedStartingUnits(UnitGroupFromId(6), "Prot", false);
}
else {
libABFE498B_gv_aP_Triggers_skipCutscenes = true;
lib15EF4C78_gf_RemoveUnusedStartingUnits(UnitGroupFromId(6), libABFE498B_gv_aP_Triggers_Option_overridePlayerRace, false);
if ((libABFE498B_gv_aP_Triggers_Option_overridePlayerRace == "Terr")) {
PlayerSetRace(gv_pLAYER_01_USER, "Terr");
lib5BD4895D_gf_AP_Core_MapConfig_setPlayerFaction(gv_pLAYER_01_USER, lib5BD4895D_gv_aP_Core_Faction_RAYNORS_RAIDERS);
libNtve_gf_SetUpgradeLevelForPlayer(gv_pLAYER_01_USER, "AP_HaveGhostOrSpectreOrThorNuke", 1);
}
else {
if ((libABFE498B_gv_aP_Triggers_Option_overridePlayerRace == "Zerg")) {
PlayerSetRace(gv_pLAYER_01_USER, "Zerg");
lib5BD4895D_gf_AP_Core_MapConfig_setPlayerFaction(gv_pLAYER_01_USER, lib5BD4895D_gv_aP_Core_Faction_KERRIGAN_SWARM);
}

}
libLbty_gf_OrderWorkerstoGatherNearbyResources(RegionEntireMap(), gv_pLAYER_01_USER);
lib15EF4C78_gf_AP_Player_UtilTownHallAutoRally(gv_pLAYER_01_USER);
}
return true;
}

//--------------------------------------------------------------------------------------------------
void gt_FactionSwapInit_Init () {
gt_FactionSwapInit = TriggerCreate("gt_FactionSwapInit_Func");
TriggerAddEventGeneric(gt_FactionSwapInit, lib5BD4895D_gv_aP_Core_LOAD_FINISHED_EVENT);
}

//--------------------------------------------------------------------------------------------------
// Trigger: onDifficultyCasual
//--------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -1527,6 +1568,13 @@ void gt_ArchInit_Init () {
//--------------------------------------------------------------------------------------------------
bool gt_Initialization_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
unitgroup auto98A67803_g;
int auto98A67803_u;
unit auto98A67803_var;
unitgroup auto206A5DC1_g;
int auto206A5DC1_u;
unit auto206A5DC1_var;

// Actions
if (!runActions) {
return true;
Expand All @@ -1536,6 +1584,20 @@ bool gt_Initialization_Func (bool testConds, bool runActions) {
TriggerExecute(gt_Init04MusicSound, true, false);
TriggerExecute(gt_Init05Environment, true, false);
TriggerExecute(gt_Init06Difficulties, true, false);
auto98A67803_g = UnitGroup("AP_Ghost", c_playerAny, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto98A67803_u = UnitGroupCount(auto98A67803_g, c_unitCountAll);
for (;; auto98A67803_u -= 1) {
auto98A67803_var = UnitGroupUnitFromEnd(auto98A67803_g, auto98A67803_u);
if (auto98A67803_var == null) { break; }
UnitSetPropertyFixed(auto98A67803_var, c_unitPropEnergyPercent, 100.0);
}
auto206A5DC1_g = UnitGroup("AP_GhostResourceEfficiency", c_playerAny, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto206A5DC1_u = UnitGroupCount(auto206A5DC1_g, c_unitCountAll);
for (;; auto206A5DC1_u -= 1) {
auto206A5DC1_var = UnitGroupUnitFromEnd(auto206A5DC1_g, auto206A5DC1_u);
if (auto206A5DC1_var == null) { break; }
UnitSetPropertyFixed(auto206A5DC1_var, c_unitPropEnergyPercent, 100.0);
}
TriggerEnable(gt_SporeCrawlerDigIn0102, true);
TriggerExecute(gt_IntroQ, true, true);
return true;
Expand Down Expand Up @@ -1654,9 +1716,9 @@ bool gt_Init03Units_Func (bool testConds, bool runActions) {
unitgroup auto88E24685_g;
int auto88E24685_u;
unit auto88E24685_var;
unitgroup auto98A67803_g;
int auto98A67803_u;
unit auto98A67803_var;
unitgroup auto50C89EAB_g;
int auto50C89EAB_u;
unit auto50C89EAB_var;
const int auto63492BC7_ae = 3;
const int auto63492BC7_ai = 1;
unitgroup autoE71202A8_g;
Expand Down Expand Up @@ -1723,13 +1785,12 @@ bool gt_Init03Units_Func (bool testConds, bool runActions) {
if (auto88E24685_var == null) { break; }
UnitBehaviorAddPlayer(auto88E24685_var, "Harmless", gv_pLAYER_02_DOMINION, 1);
}
auto98A67803_g = UnitGroup("Overseer", c_playerAny, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto98A67803_u = UnitGroupCount(auto98A67803_g, c_unitCountAll);
for (;; auto98A67803_u -= 1) {
auto98A67803_var = UnitGroupUnitFromEnd(auto98A67803_g, auto98A67803_u);
if (auto98A67803_var == null) { break; }
UnitIssueOrder(auto98A67803_var, Order(AbilityCommand("GenerateCreep", 0)), c_orderQueueReplace);
UnitIssueOrder(auto98A67803_var, Order(AbilityCommand("move", 2)), c_orderQueueAddToEnd);
auto50C89EAB_g = UnitGroup("CreepPodsUnit", gv_pLAYER_02_DOMINION, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto50C89EAB_u = UnitGroupCount(auto50C89EAB_g, c_unitCountAll);
for (;; auto50C89EAB_u -= 1) {
auto50C89EAB_var = UnitGroupUnitFromEnd(auto50C89EAB_g, auto50C89EAB_u);
if (auto50C89EAB_var == null) { break; }
UnitBehaviorAddPlayer(auto50C89EAB_var, "Harmless", gv_pLAYER_02_DOMINION, 1);
}
gv_vaultBeacon[1] = UnitFromId(755);
gv_vaultBeacon[2] = UnitFromId(756);
Expand Down Expand Up @@ -6034,7 +6095,7 @@ bool gt_IntroQ_Func (bool testConds, bool runActions) {
TriggerEnable(TriggerGetCurrent(), false);
TriggerQueueEnter();
TriggerExecute(gt_IntroSetup, true, true);
if ((libABFE498B_gv_aP_Triggers_skipCutscenes == false)) {
if ((libABFE498B_gv_aP_Triggers_skipCutscenes == false) && (libABFE498B_gv_aP_Triggers_Option_overridePlayerRace == "Neut")) {
TriggerExecute(gt_IntroCinematic, true, true);
TriggerExecute(gt_IntroCinematicEnd, true, true);
}
Expand Down Expand Up @@ -6372,7 +6433,7 @@ bool gt_MidQ_Func (bool testConds, bool runActions) {

TriggerEnable(TriggerGetCurrent(), false);
TriggerQueueEnter();
if ((libABFE498B_gv_aP_Triggers_skipCutscenes == false)) {
if ((libABFE498B_gv_aP_Triggers_skipCutscenes == false) && (libABFE498B_gv_aP_Triggers_Option_overridePlayerRace == "Neut")) {
TriggerExecute(gt_MidSetup, true, true);
TriggerExecute(gt_MidCinematic, true, true);
TriggerExecute(gt_MidCinematicEnd, true, true);
Expand Down Expand Up @@ -6992,6 +7053,7 @@ void gt_VictoryCleanup_Init () {
// Trigger Initialization
//--------------------------------------------------------------------------------------------------
void InitTriggers () {
gt_FactionSwapInit_Init();
gt_onDifficultyCasual_Init();
gt_onDifficultyNormal_Init();
gt_onDifficultyHard_Init();
Expand Down
Loading

0 comments on commit d8f5d2f

Please sign in to comment.