Skip to content

Commit 10794ac

Browse files
KJeff01pull[bot]
authored andcommittedSep 28, 2023
Change win condition for Gamma 7
Force the player to bring a truck or factory into the Gamma 8 area of the map before winning.
1 parent fc88290 commit 10794ac

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed
 

‎data/base/script/campaign/cam3-ad1.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,15 @@ function checkMissileSilos()
231231

232232
if (capturedSilos)
233233
{
234-
return true;
234+
const Y_SCROLL_LIMIT = 140; // About the same number as the one in the Gamma 8 script.
235+
let safeToWinObjs = enumArea(0, Y_SCROLL_LIMIT, mapWidth, mapHeight, CAM_HUMAN_PLAYER, false).filter((obj) => (
236+
((obj.type === DROID && obj.droidType === DROID_CONSTRUCT) || (obj.type === STRUCTURE && obj.stattype === FACTORY && obj.status === BUILT))
237+
));
238+
239+
if (safeToWinObjs.length > 0)
240+
{
241+
return true;
242+
}
235243
}
236244

237245
var siloArea = camMakePos(getObject("missileSilos"));
@@ -246,7 +254,7 @@ function checkMissileSilos()
246254

247255
function eventStartLevel()
248256
{
249-
camSetExtraObjectiveMessage(_("Secure a missile silo"));
257+
camSetExtraObjectiveMessage(_("Build a forward base at the silos"));
250258

251259
var siloZone = getObject("missileSilos");
252260
var startpos = getObject("startPosition");

0 commit comments

Comments
 (0)