1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424
|
include("script/campaign/libcampaign.js");
include("script/campaign/templates.js");
const mis_newParadigmRes = [
"R-Wpn-MG1Mk1", "R-Vehicle-Body01", "R-Sys-Spade1Mk1", "R-Vehicle-Prop-Wheels",
"R-Sys-Engineering01", "R-Wpn-MG-Damage03", "R-Wpn-MG-ROF01", "R-Wpn-Cannon-Damage02",
"R-Wpn-Flamer-Damage03", "R-Wpn-Flamer-Range01", "R-Wpn-Flamer-ROF01",
"R-Defense-WallUpgrade01", "R-Struc-Materials01", "R-Vehicle-Engine02",
"R-Struc-RprFac-Upgrade02", "R-Wpn-Rocket-Damage01", "R-Wpn-Rocket-ROF03",
"R-Vehicle-Metals01", "R-Wpn-Mortar-Damage02", "R-Wpn-Rocket-Accuracy01",
"R-Wpn-RocketSlow-Damage01", "R-Wpn-Mortar-ROF01",
];
const mis_scavengerRes = [
"R-Wpn-Flamer-Damage02", "R-Wpn-Flamer-Range01", "R-Wpn-Flamer-ROF01",
"R-Wpn-MG-Damage03", "R-Wpn-MG-ROF01", "R-Wpn-Rocket-Damage01",
"R-Wpn-Cannon-Damage02", "R-Wpn-Mortar-Damage02", "R-Wpn-Mortar-ROF01",
"R-Wpn-Rocket-ROF03", "R-Defense-WallUpgrade01", "R-Struc-Materials01",
];
const mis_newParadigmResClassic = [
"R-Defense-WallUpgrade01", "R-Struc-Factory-Upgrade01", "R-Struc-Materials01",
"R-Wpn-MG-ROF01", "R-Vehicle-Engine01", "R-Wpn-Cannon-Damage02", "R-Wpn-Flamer-Damage03",
"R-Wpn-MG-Damage03", "R-Wpn-Rocket-Damage01", "R-Wpn-Flamer-ROF01", "R-Vehicle-Metals01",
"R-Struc-RprFac-Upgrade03",
];
const mis_scavengerResClassic = [
"R-Wpn-MG-Damage03", "R-Wpn-Rocket-Damage01"
];
function activateLZDefenders()
{
if (camClassicMode())
{
return;
}
camManageGroup(camMakeGroup("PatrolForce"), CAM_ORDER_PATROL, {
pos: [
camMakePos("PatrolPos1"),
camMakePos("PatrolPos2"),
camMakePos("PatrolPos3"),
camMakePos("PatrolPos4")
],
interval: camSecondsToMilliseconds(30),
regroup: false,
});
}
function activateScavBaseDefenders()
{
if (camClassicMode())
{
return;
}
camManageGroup(camMakeGroup("DefendForce"), CAM_ORDER_DEFEND, {
pos: camMakePos("defensePos"),
radius: 16,
regroup: false
});
}
function sendRocketForce()
{
camManageGroup(camMakeGroup("RocketForce"), CAM_ORDER_ATTACK, {
regroup: true,
count: -1,
});
}
function sendTankScoutForce()
{
camManageGroup(camMakeGroup("TankScoutForce"), CAM_ORDER_ATTACK, {
regroup: true,
count: -1,
});
// FIXME: Re-enable this when commander/formation movement
// becomes good enough. Remove the call above then.
/*
camManageGroup(camMakeGroup("TankScoutForce"), CAM_ORDER_FOLLOW, {
droid: "TankScoutForceCommander",
order: CAM_ORDER_ATTACK
});
*/
}
function sendTankForce()
{
camManageGroup(camMakeGroup("TankForce"), CAM_ORDER_ATTACK, {
regroup: true,
count: -1,
});
// FIXME: Re-enable this when commander/formation movement
// becomes good enough. Remove the call above then.
/*
camManageGroup(camMakeGroup("TankForce"), CAM_ORDER_FOLLOW, {
droid: "TankForceCommander",
order: CAM_ORDER_ATTACK
});
*/
}
function enableNPFactory()
{
camEnableFactory("NPCentralFactory");
}
function enableNorthScavFactory()
{
camEnableFactory("ScavNorthFactory");
}
camAreaEvent("RemoveBeacon", function()
{
hackRemoveMessage("C1C_OBJ1", PROX_MSG, CAM_HUMAN_PLAYER);
});
camAreaEvent("AmbushTrigger", function()
{
// wzcam enables factory here, even though it's quite early
camEnableFactory("ScavCentralFactory");
camManageGroup(camMakeGroup("AmbushForce"), CAM_ORDER_ATTACK, {
pos: "AmbushTarget",
regroup: true,
count: -1,
});
// FIXME: Re-enable this when commander/formation movement
// becomes good enough. Remove the call above then.
// FIXME: This group has more droids than the commander can handle!
/*
camManageGroup(camMakeGroup("AmbushForce"), CAM_ORDER_FOLLOW, {
droid: "AmbushForceCommander",
order: CAM_ORDER_ATTACK,
pos: "AmbushTarget",
});
*/
});
camAreaEvent("ScavCentralFactoryTrigger", function()
{
// doesn't make much sense because the player
// passes through AmbushTrigger anyway
// before getting there
camEnableFactory("ScavCentralFactory");
});
camAreaEvent("ScavNorthFactoryTrigger", function()
{
camCallOnce("enableNorthScavFactory");
});
camAreaEvent("NPNorthFactoryTrigger", function()
{
camEnableFactory("NPNorthFactory");
});
function camEnemyBaseEliminated_NPCentralFactory()
{
camEnableFactory("NPNorthFactory");
}
function getDroidsForNPLZ(args)
{
const scouts = [ cTempl.nppod, cTempl.nphmg ];
const heavies = [ cTempl.npslc, cTempl.npsmct ];
const list = [];
const LIMIT = ((difficulty >= INSANE) ? 10 : 8);
let numScouts = camRand(5) + 1;
let heavy = heavies[camRand(heavies.length)];
let loopRuns = 0;
if (camRand(100) < 50)
{
list.push(cTempl.npsens); //sensor will count towards scout total
numScouts -= 1;
heavy = cTempl.npmor;
}
while (list.length < LIMIT)
{
list.push((loopRuns < numScouts) ? scouts[camRand(scouts.length)] : heavy);
++loopRuns;
}
return list;
}
camAreaEvent("NPLZ1Trigger", function()
{
// Message4 here, Message3 for the second LZ, and
// please don't ask me why they did it this way
camPlayVideos({video: "MB1C4_MSG", type: MISS_MSG});
camDetectEnemyBase("NPLZ1Group");
camSetBaseReinforcements("NPLZ1Group", camChangeOnDiff(camMinutesToMilliseconds((difficulty >= INSANE) ? 4.5 : 5)), "getDroidsForNPLZ",
CAM_REINFORCE_TRANSPORT, {
entry: { x: 126, y: 76 },
exit: { x: 126, y: 36 },
posLZ: camMakePos("EastNPLZ")
}
);
camCallOnce("activateLZDefenders");
});
camAreaEvent("NPLZ2Trigger", function()
{
camPlayVideos({video: "MB1C3_MSG", type: MISS_MSG});
camDetectEnemyBase("NPLZ2Group");
camCallOnce("enableNorthScavFactory");
camSetBaseReinforcements("NPLZ2Group", camChangeOnDiff(camMinutesToMilliseconds(5)), "getDroidsForNPLZ",
CAM_REINFORCE_TRANSPORT, {
entry: { x: 126, y: 76 },
exit: { x: 126, y: 36 },
posLZ: camMakePos("WestNPLZ")
}
);
});
function insaneReinforcementSpawn()
{
const units = [cTempl.npsmct, cTempl.nppod];
const limits = {minimum: 6, maxRandom: 4};
const location = ["reinforceNorth", "reinforceSouthEast"];
camSendGenericSpawn(CAM_REINFORCE_GROUND, CAM_NEW_PARADIGM, CAM_REINFORCE_CONDITION_ARTIFACTS, location, units, limits.minimum, limits.maxRandom);
}
function eventStartLevel()
{
camSetStandardWinLossConditions(CAM_VICTORY_STANDARD, cam_levels.alpha7);
const startPos = getObject("startPosition");
const lz = getObject("landingZone");
centreView(startPos.x, startPos.y);
setNoGoArea(lz.x, lz.y, lz.x2, lz.y2, CAM_HUMAN_PLAYER);
camSetMissionTimer(camChangeOnDiff(camHoursToSeconds(2)));
setAlliance(CAM_NEW_PARADIGM, CAM_SCAV_7, true);
if (camClassicMode())
{
camClassicResearch(mis_newParadigmResClassic, CAM_NEW_PARADIGM);
camClassicResearch(mis_scavengerResClassic, CAM_SCAV_7);
camSetArtifacts({
"ScavSouthFactory": { tech: "R-Wpn-Rocket05-MiniPod" },
"NPResearchFacility": { tech: "R-Struc-Research-Module" },
"NPCentralFactory": { tech: "R-Vehicle-Prop-Tracks" },
"NPNorthFactory": { tech: "R-Vehicle-Engine01" },
});
}
else
{
camCompleteRequiredResearch(mis_newParadigmRes, CAM_NEW_PARADIGM);
camCompleteRequiredResearch(mis_scavengerRes, CAM_SCAV_7);
camUpgradeOnMapTemplates(cTempl.bloke, cTempl.blokeheavy, CAM_SCAV_7);
camUpgradeOnMapTemplates(cTempl.trike, cTempl.trikeheavy, CAM_SCAV_7);
camUpgradeOnMapTemplates(cTempl.buggy, cTempl.buggyheavy, CAM_SCAV_7);
camUpgradeOnMapTemplates(cTempl.bjeep, cTempl.bjeepheavy, CAM_SCAV_7);
if (camAllowInsaneSpawns())
{
addDroid(CAM_NEW_PARADIGM, 90, 107, "MRP Bug Wheels", tBody.tank.bug, tProp.tank.wheels, "", "", tWeap.tank.miniRocketPod);
addDroid(CAM_NEW_PARADIGM, 89, 107, "MRP Bug Wheels", tBody.tank.bug, tProp.tank.wheels, "", "", tWeap.tank.miniRocketPod);
addDroid(CAM_NEW_PARADIGM, 88, 107, "MRP Bug Wheels", tBody.tank.bug, tProp.tank.wheels, "", "", tWeap.tank.miniRocketPod);
addDroid(CAM_NEW_PARADIGM, 90, 110, "MRP Bug Wheels", tBody.tank.bug, tProp.tank.wheels, "", "", tWeap.tank.miniRocketPod);
addDroid(CAM_NEW_PARADIGM, 89, 110, "MRP Bug Wheels", tBody.tank.bug, tProp.tank.wheels, "", "", tWeap.tank.miniRocketPod);
addDroid(CAM_NEW_PARADIGM, 88, 110, "MRP Bug Wheels", tBody.tank.bug, tProp.tank.wheels, "", "", tWeap.tank.miniRocketPod);
addDroid(CAM_NEW_PARADIGM, 114, 25, "MRP Scorpion Halftracks", tBody.tank.scorpion, tProp.tank.halfTracks, "", "", tWeap.tank.miniRocketPod);
addDroid(CAM_NEW_PARADIGM, 114, 26, "MRP Scorpion Halftracks", tBody.tank.scorpion, tProp.tank.halfTracks, "", "", tWeap.tank.miniRocketPod);
addDroid(CAM_NEW_PARADIGM, 114, 27, "MRP Scorpion Halftracks", tBody.tank.scorpion, tProp.tank.halfTracks, "", "", tWeap.tank.miniRocketPod);
addDroid(CAM_NEW_PARADIGM, 116, 25, "Lancer Scorpion Halftracks", tBody.tank.scorpion, tProp.tank.halfTracks, "", "", tWeap.tank.lancer);
addDroid(CAM_NEW_PARADIGM, 116, 26, "Lancer Scorpion Halftracks", tBody.tank.scorpion, tProp.tank.halfTracks, "", "", tWeap.tank.lancer);
addDroid(CAM_NEW_PARADIGM, 116, 27, "Lancer Scorpion Halftracks", tBody.tank.scorpion, tProp.tank.halfTracks, "", "", tWeap.tank.lancer);
}
camSetArtifacts({
"ScavSouthFactory": { tech: ["R-Wpn-Rocket05-MiniPod", "R-Wpn-Cannon2Mk1"] },
"NPResearchFacility": { tech: "R-Struc-Research-Module" },
"NPCentralFactory": { tech: "R-Vehicle-Prop-Tracks" },
"NPNorthFactory": { tech: "R-Vehicle-Engine01" },
});
}
camSetEnemyBases({
"ScavSouthDerrickGroup": {
cleanup: "ScavSouthDerrick",
detectMsg: "C1C_BASE1",
detectSnd: cam_sounds.baseDetection.scavengerOutpostDetected,
eliminateSnd: cam_sounds.baseElimination.scavengerOutpostEradicated
},
"ScavSouthEastHighgroundGroup": {
cleanup: "ScavSouthEastHighground",
detectMsg: "C1C_BASE6",
detectSnd: cam_sounds.baseDetection.scavengerBaseDetected,
eliminateSnd: cam_sounds.baseElimination.scavengerBaseEradicated
},
"ScavNorthBaseGroup": {
cleanup: "ScavNorthBase",
detectMsg: "C1C_BASE3",
detectSnd: cam_sounds.baseDetection.scavengerBaseDetected,
eliminateSnd: cam_sounds.baseElimination.scavengerBaseEradicated
},
"ScavSouthPodPitsGroup": {
cleanup: "ScavSouthPodPits",
detectMsg: "C1C_BASE4",
detectSnd: cam_sounds.baseDetection.scavengerOutpostDetected,
eliminateSnd: cam_sounds.baseElimination.scavengerOutpostEradicated
},
"ScavCentralBaseGroup": {
cleanup: "MixedCentralBase", // two bases with same cleanup region
detectMsg: "C1C_BASE5",
detectSnd: cam_sounds.baseDetection.scavengerBaseDetected,
eliminateSnd: cam_sounds.baseElimination.scavengerBaseEradicated,
player: CAM_SCAV_7 // hence discriminate by player filter
},
"NPEastBaseGroup": {
cleanup: "NPEastBase",
detectMsg: "C1C_BASE7",
detectSnd: cam_sounds.baseDetection.enemyBaseDetected,
eliminateSnd: cam_sounds.baseElimination.enemyBaseEradicated,
},
"NPNorthEastGeneratorGroup": {
cleanup: "NPNorthEastGenerator",
detectMsg: "C1C_BASE8",
detectSnd: cam_sounds.baseDetection.enemyBaseDetected,
eliminateSnd: cam_sounds.baseElimination.enemyBaseEradicated,
},
"NPNorthEastBaseGroup": {
cleanup: "NPNorthEastBase",
detectMsg: "C1C_BASE9",
detectSnd: cam_sounds.baseDetection.enemyBaseDetected,
eliminateSnd: cam_sounds.baseElimination.enemyBaseEradicated,
},
"NPCentralBaseGroup": {
cleanup: "MixedCentralBase", // two bases with same cleanup region
detectMsg: "C1C_BASE10",
detectSnd: cam_sounds.baseDetection.enemyBaseDetected,
eliminateSnd: cam_sounds.baseElimination.enemyBaseEradicated,
player: CAM_NEW_PARADIGM // hence discriminate by player filter
},
"NPLZ1Group": {
cleanup: "NPLZ1", // kill the four towers to disable LZ
detectMsg: "C1C_LZ1",
eliminateSnd: cam_sounds.baseElimination.enemyBaseEradicated,
player: CAM_NEW_PARADIGM // required for LZ-type bases
},
"NPLZ2Group": {
cleanup: "NPLZ2", // kill the four towers to disable LZ
detectMsg: "C1C_LZ2",
eliminateSnd: cam_sounds.baseElimination.enemyBaseEradicated,
player: CAM_NEW_PARADIGM // required for LZ-type bases
},
});
hackAddMessage("C1C_OBJ1", PROX_MSG, CAM_HUMAN_PLAYER, false); // initial beacon
camPlayVideos([{video: "MB1C_MSG", type: CAMP_MSG}, {video: "MB1C2_MSG", type: CAMP_MSG}]);
camSetFactories({
"ScavSouthFactory": {
assembly: "ScavSouthFactoryAssembly",
order: CAM_ORDER_ATTACK,
groupSize: 4,
throttle: camChangeOnDiff(camSecondsToMilliseconds((difficulty >= INSANE) ? 20 : 25)),
templates: (!camClassicMode()) ? [ cTempl.buscan, cTempl.rbjeep8, cTempl.trikeheavy, cTempl.buggyheavy ] : [ cTempl.buscan, cTempl.rbjeep, cTempl.trike, cTempl.buggy ]
},
"ScavCentralFactory": {
assembly: "ScavCentralFactoryAssembly",
order: CAM_ORDER_ATTACK,
groupSize: 4,
throttle: camChangeOnDiff(camSecondsToMilliseconds((difficulty >= INSANE) ? 20 : 25)),
templates: (!camClassicMode()) ? [ cTempl.firecan, cTempl.rbuggy, cTempl.bjeepheavy, cTempl.blokeheavy ] : [ cTempl.firecan, cTempl.rbuggy, cTempl.bjeep, cTempl.bloke ]
},
"ScavNorthFactory": {
assembly: "ScavNorthFactoryAssembly",
order: CAM_ORDER_ATTACK,
groupSize: 4,
throttle: camChangeOnDiff(camSecondsToMilliseconds((difficulty >= INSANE) ? 15 : 20)),
templates: (!camClassicMode()) ? [ cTempl.firecan, cTempl.rbuggy, cTempl.buscan, cTempl.trikeheavy ] : [ cTempl.firecan, cTempl.rbuggy, cTempl.buscan, cTempl.trike ]
},
"NPCentralFactory": {
assembly: "NPCentralFactoryAssembly",
order: CAM_ORDER_ATTACK,
groupSize: 4,
throttle: camChangeOnDiff(camSecondsToMilliseconds((difficulty >= INSANE) ? 40 : 60)),
data: {
regroup: false,
repair: 40,
count: -1,
},
templates: (difficulty >= INSANE) ? [ cTempl.npmor, cTempl.npsens, cTempl.npsmc ] : [ cTempl.npmor, cTempl.npsens, cTempl.npslc ]
},
"NPNorthFactory": {
assembly: "NPNorthFactoryAssembly",
order: CAM_ORDER_ATTACK,
groupSize: 4,
throttle: camChangeOnDiff(camSecondsToMilliseconds((difficulty >= INSANE) ? 40 : 50)),
data: {
regroup: false,
repair: 66,
count: -1,
},
templates: [ cTempl.nppod, cTempl.npsmct, cTempl.npmor ]
},
});
camManageTrucks(CAM_NEW_PARADIGM);
replaceTexture("page-7-barbarians-arizona.png", "page-7-barbarians-kevlar.png");
camEnableFactory("ScavSouthFactory");
camManageGroup(camMakeGroup("RocketScoutForce"), CAM_ORDER_ATTACK, {
regroup: true,
count: -1,
});
queue("sendRocketForce", camSecondsToMilliseconds(25));
queue("sendTankScoutForce", camSecondsToMilliseconds(30));
queue("sendTankForce", camSecondsToMilliseconds(100)); // in wzcam it moves back and then forward
queue("enableNPFactory", camMinutesToMilliseconds(5));
queue("activateScavBaseDefenders", camSecondsToMilliseconds(3));
if (camAllowInsaneSpawns())
{
setTimer("insaneReinforcementSpawn", camMinutesToMilliseconds(4));
}
}
|