Skip to content

Commit

Permalink
Fix cam3-b mission victory.
Browse files Browse the repository at this point in the history
Make sure Gamma base is considered an enemy so that the base detects
structures properly.

The mock battle can last longer and the first land reinforcement queue
now is five minutes. New factory assembly positions from alfred007.
  • Loading branch information
KJeff01 committed Jan 3, 2018
1 parent beba57f commit 8e053d2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 14 deletions.
7 changes: 6 additions & 1 deletion data/base/script/campaign/cam2-b.js
Expand Up @@ -80,7 +80,12 @@ function vtolAttack()
"vtolAppearPosW",
"vtolAppearPosN",
];
camSetVtolData(THE_COLLECTIVE, POSITIONS, "vtolRemove", list, camChangeOnDiff(300000), "COCommandCenter"); //5 min
var ext = {
limit: [4, 4], //paired with list array
alternate: true,
altIdx: 0
};
camSetVtolData(THE_COLLECTIVE, POSITIONS, "vtolRemove", list, camChangeOnDiff(300000), "COCommandCenter", ext); //5 min
}

function truckDefense()
Expand Down
34 changes: 23 additions & 11 deletions data/base/script/campaign/cam3-b.js
Expand Up @@ -3,6 +3,7 @@ include("script/campaign/templates.js");
include("script/campaign/transitionTech.js");

var trapActive;
var gammaAttackCount;
const GAMMA = 1; // Player 1 is Gamma team.
const NEXUS_RES = [
"R-Defense-WallUpgrade08", "R-Struc-Materials08", "R-Struc-Factory-Upgrade06",
Expand Down Expand Up @@ -106,15 +107,18 @@ function sendNXTransporter()
pos = "nexusWestTransportPos";
}

camSendReinforcement(NEXUS, camMakePos(pos), list,
CAM_REINFORCE_TRANSPORT, {
message: LZ_ALIAS + lzNum,
entry: { x: 63, y: 4 },
exit: { x: 63, y: 4 }
}
);

queue("sendNXTransporter", camChangeOnDiff(180000)); //3 min
if (camDef(pos))
{
camSendReinforcement(NEXUS, camMakePos(pos), list,
CAM_REINFORCE_TRANSPORT, {
message: LZ_ALIAS + lzNum,
entry: { x: 63, y: 4 },
exit: { x: 63, y: 4 }
}
);

queue("sendNXTransporter", camChangeOnDiff(180000)); //3 min
}
}

//Send Nexus land units
Expand Down Expand Up @@ -203,7 +207,7 @@ function trapSprung()
camCallOnce("activateNexusGroups");
enableAllFactories();

queue("sendNXlandReinforcements", camChangeOnDiff(240000)); // 4 min
queue("sendNXlandReinforcements", camChangeOnDiff(300000)); //5 min
sendNXTransporter();
changePlayerColour(GAMMA, NEXUS); // Black painting.
playSound(SYNAPTICS_ACTIVATED);
Expand All @@ -216,15 +220,21 @@ function setupCapture()

function eventAttacked(victim, attacker)
{
if (!trapActive && victim.player === GAMMA)
if (!trapActive && gammaAttackCount > 4)
{
camCallOnce("setupCapture");
}

if (victim.player === GAMMA && attacker.player === NEXUS)
{
gammaAttackCount = gammaAttackCount + 1;
}
}

function eventStartLevel()
{
trapActive = false;
gammaAttackCount = 0;
const MISSION_TIME = camChangeOnDiff(1200); //20 minutes. Rescue part.
var startpos = getObject("startPosition");
var lz = getObject("landingZone");
Expand All @@ -242,6 +252,7 @@ function eventStartLevel()
camCompleteRequiredResearch(GAMMA_ALLY_RES, GAMMA);
camCompleteRequiredResearch(NEXUS_RES, GAMMA); //They get even more research.

setAlliance(GAMMA, CAM_HUMAN_PLAYER, false);
setAlliance(GAMMA, NEXUS, true);

camSetArtifacts({
Expand Down Expand Up @@ -305,6 +316,7 @@ function eventStartLevel()
camPlayVideos(["MB3_B_MSG", "MB3_B_MSG2"]);

changePlayerColour(GAMMA, 0);
setAlliance(GAMMA, CAM_HUMAN_PLAYER, true);

queue("transferPower", 3000);
queue("vtolAttack", camChangeOnDiff(300000)); //5 min
Expand Down
4 changes: 2 additions & 2 deletions data/base/wrf/cam3/cam3b/labels.json
Expand Up @@ -77,11 +77,11 @@
},
"position_19": {
"label": "gammaFactoryAssembly",
"pos": [1216, 2112]
"pos": [1472, 2112]
},
"position_20": {
"label": "gammaCyborgFactoryAssembly",
"pos": [1856, 2112]
"pos": [2112, 2112]
},

"area_0": {
Expand Down

0 comments on commit 8e053d2

Please sign in to comment.