/
MapScript.galaxy
4457 lines (3939 loc) · 192 KB
/
MapScript.galaxy
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
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//==================================================================================================
//
// Generated Map Script
//
// Name: Welcome to the Jungle
//
//==================================================================================================
include "TriggerLibs/NativeLib"
include "TriggerLibs/LibertyLib"
include "TriggerLibs/CampaignLib"
//--------------------------------------------------------------------------------------------------
// Library Initialization
//--------------------------------------------------------------------------------------------------
void InitLibs () {
libNtve_InitLib();
libLbty_InitLib();
libCamp_InitLib();
}
//--------------------------------------------------------------------------------------------------
// Constants
//--------------------------------------------------------------------------------------------------
const int gv_p1_USER = 1;
const int gv_p2_PROTOSS_EAST_ATTACKERS = 2;
const int gv_p3_PROTOSS_SCRIPTED = 3;
const int gv_p4_PROTOSS_WEST_ESCORTS = 4;
const int gv_p5_TERRAZINE = 5;
//--------------------------------------------------------------------------------------------------
// Global Preset Declarations
//--------------------------------------------------------------------------------------------------
const int ge_PRESET_MultipleTerrazineSealingState_Disabled = 0;
const int ge_PRESET_MultipleTerrazineSealingState_Enabled = 1;
const int ge_PRESET_MultipleTerrazineSealingState_Completed = 2;
//--------------------------------------------------------------------------------------------------
// Global Variables
//--------------------------------------------------------------------------------------------------
bool gv_gameOver;
bool gv_inCinematic;
unit gv_superWarpGateP3NoAI;
unit[14] gv_terrazineNodes;
wave[14][3] gv_terrazineAttackWaves;
region[7] gv_terrazineRegions;
playergroup gv_protossPlayerGroup;
unitgroup gv_harvestingSpeedBumpNWBullies;
unitgroup gv_harvestingSpeedBumpCentralBullies;
timer gv_protossAggroTimer;
unit[4] gv_nEDefenders;
point[4] gv_nEDefenderPositions;
unitgroup gv_nEDefendersGroup;
int gv_numberOfNEDefenders;
unit gv_terrazineHarvesting;
int gv_gasControlCount;
int gv_gasHarvestingCount;
int gv_sCVsKilledWhileHarvesting;
point gv_sCVKilledAlertPosition;
unit gv_sCVGoingHome;
unit gv_droppedCargoFlashUnit;
int gv_playerScore;
int[14] gv_playerHarvesterPings;
unitgroup gv_probeHarvesters;
int gv_probesThwarted;
int gv_multipleTerrazineSealingState;
int gv_multipleTerrazineSealingFirstTarget;
int gv_protossScore;
int[14] gv_protossHarvesterPings;
int gv_protossThreatLevel;
int gv_statSCVsLost;
int gv_primaryObjectiveGetGas;
int gv_primaryObjectiveStopProtossGas;
int gv_playerCollectionQuota;
int gv_protossCollectionQuota;
int gv_bonusObjectiveCollectRelics;
int gv_bonusObjectiveCollectRelicsNeeded;
int gv_bonusObjectiveCollectRelicsFound;
unit gv_victoryTerrazine;
bool gv_victoryCinematicCompleted;
void InitGlobals () {
gv_protossPlayerGroup = PlayerGroupEmpty();
gv_harvestingSpeedBumpNWBullies = UnitGroupEmpty();
gv_harvestingSpeedBumpCentralBullies = UnitGroupEmpty();
gv_protossAggroTimer = TimerCreate();
gv_nEDefendersGroup = UnitGroupEmpty();
gv_probeHarvesters = UnitGroupEmpty();
gv_protossThreatLevel = 1;
gv_primaryObjectiveGetGas = c_invalidObjectiveId;
gv_primaryObjectiveStopProtossGas = c_invalidObjectiveId;
gv_bonusObjectiveCollectRelics = c_invalidObjectiveId;
gv_victoryTerrazine = UnitFromId(311);
}
//--------------------------------------------------------------------------------------------------
// Global Function Declarations
//--------------------------------------------------------------------------------------------------
void gf_AddFriendlyWavepoints (int lp_terrazineIndex);
void gf_AITerrazineHarvestAttempt (int lp_primaryTerrazineIndex, int lp_secondaryRegionSearchIndex);
fixed gf_CalculateOffset (fixed lp_real);
int gf_GetClosestRawTerrazineToProtoss (int lp_regionToCheck);
int gf_GetClosestDroppedTerrazineToProtoss ();
unit gf_GetClosestProbeToNode (int lp_canisterHarvestTargetIndex);
unit gf_NodeMatchingCustomValue (int lp_param_TerrazineIndex);
void gf_ResearchForAllProtoss (string lp_upgrade);
//--------------------------------------------------------------------------------------------------
// Trigger Variables
//--------------------------------------------------------------------------------------------------
trigger gt_Initialization;
trigger gt_Init01Technology;
trigger gt_Init02Players;
trigger gt_Init03VariablesUnits;
trigger gt_Init04Music;
trigger gt_Init05Environment;
trigger gt_Init06Difficulty;
trigger gt_Init07Help;
trigger gt_IntroSequence;
trigger gt_StartGame;
trigger gt_GoliathandGatherTerrazineTipsQ;
trigger gt_CampaignTipsQ;
trigger gt_PingTerrazineonMinimapandReveal;
trigger gt_ProtossAggroViaLeavingPlayerBase;
trigger gt_ProtossAggroViaTimer;
trigger gt_ProtossAggroLineQ;
trigger gt_ProtossAggroBullies;
trigger gt_StartRain;
trigger gt_HarvestingSpeedBumpsNWesternTerritory;
trigger gt_HarvestingSpeedBumpsCentralTerritory;
trigger gt_InitNERelicDefenders;
trigger gt_NEDefenderScriptedAI;
trigger gt_NEDefenderDeath;
trigger gt_NEDefenderSpawned;
trigger gt_NEVoidRays;
trigger gt_Playerstartsharvestingterrazine;
trigger gt_ProtossmediumretaliationannounceQ;
trigger gt_ProtossheavyretaliationannounceQ;
trigger gt_SCViskilledwhileharvesting;
trigger gt_TiptoprotectSCVsQ;
trigger gt_SCVharvestingmanuallystopped;
trigger gt_PlayertriestoharvestmultiplecanistersatonceQ;
trigger gt_SCVisheadinghomewithterrazine;
trigger gt_FirstTerrazineReturnQ;
trigger gt_SCVwithterrazinediesonreturntrip;
trigger gt_DroppedterrazinecargoQ;
trigger gt_Playerhasclaimedterrazine;
trigger gt_Playerharvested1NodeQ;
trigger gt_Playerharvested3NodeQ;
trigger gt_Playerharvested4NodeQ;
trigger gt_Playerharvested6NodeQ;
trigger gt_ProtosssealingterrazineQ;
trigger gt_ProtossstartssealingfirstterrazinenodeQ;
trigger gt_Protossprobegoesidleterrazineharvestedbyplayer;
trigger gt_Probeiskilledwhileharvesting;
trigger gt_Probehassealedtheterrazine;
trigger gt_MultipleTerrazineSealingAttempt;
trigger gt_Protossseal3shrinesQ;
trigger gt_Protossseal5shrinesQ;
trigger gt_Protossseal6shrinesQ;
trigger gt_StartAI;
trigger gt_AIP2AttackWaves;
trigger gt_AITerrazineSealingEN;
trigger gt_AITerrazineSealingH;
trigger gt_AITerrazineSealingI;
trigger gt_AIResourcesMinerals;
trigger gt_AIResourcesGas;
trigger gt_StatSCVsLost;
trigger gt_VictoryProtossDestroyed;
trigger gt_ProtossDestroyedQ;
trigger gt_VictoryTerrazineCollected;
trigger gt_Victory;
trigger gt_DefeatBaseDead;
trigger gt_DefeatProtossSealedTooManyTerrazine;
trigger gt_Defeat;
trigger gt_VictoryCheat;
trigger gt_DefeatCheat;
trigger gt_PrimaryObjectiveCollectTerrazineCreateQ;
trigger gt_PrimaryObjectiveCollectTerrazineCompleted;
trigger gt_PrimaryObjectiveCollectTerrazineUpdate;
trigger gt_ObjectiveRelicProximityEnabler;
trigger gt_ObjectiveRelicsCreateQ;
trigger gt_ObjectiveRelicUpdate;
trigger gt_BriefingQ;
trigger gt_BriefingScene00;
trigger gt_BriefingScene01;
trigger gt_BriefingScene01Action;
trigger gt_BriefingScene02;
trigger gt_BriefingScene02Action;
trigger gt_BriefingScene03;
trigger gt_VictoryQ;
trigger gt_VictorySetup;
trigger gt_VictoryCinematic;
trigger gt_VictoryCinematicEnd;
trigger gt_VictoryCleanup;
//--------------------------------------------------------------------------------------------------
// Global Presets
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
// Global Functions
//--------------------------------------------------------------------------------------------------
void gf_AddFriendlyWavepoints (int lp_terrazineIndex) {
// Automatic Variable Declarations
// Implementation
if ((libNtve_gf_DifficultyValueInt(1, 1, 1, 0) == 1)) {
if (((lp_terrazineIndex == 13) || (lp_terrazineIndex == 8) || (lp_terrazineIndex == 5) || (lp_terrazineIndex == 3) || (lp_terrazineIndex == 12))) {
AIAttackWaveAddWaypoint(gv_p4_PROTOSS_WEST_ESCORTS, PointFromId(2076), false);
}
if ((libNtve_gf_DifficultyValueInt(1, 1, 1, 0) == 1) && ((lp_terrazineIndex == 7) || (lp_terrazineIndex == 9) || (lp_terrazineIndex == 4) || (lp_terrazineIndex == 1))) {
AIAttackWaveAddWaypoint(gv_p4_PROTOSS_WEST_ESCORTS, PointFromId(2077), false);
}
if ((libNtve_gf_DifficultyValueInt(1, 1, 1, 0) == 1) && ((lp_terrazineIndex == 10) || (lp_terrazineIndex == 11))) {
AIAttackWaveAddWaypoint(gv_p4_PROTOSS_WEST_ESCORTS, PointFromId(2079), false);
}
if ((libNtve_gf_DifficultyValueInt(1, 1, 1, 0) == 1) && ((lp_terrazineIndex == 6) || (lp_terrazineIndex == 2))) {
AIAttackWaveAddWaypoint(gv_p4_PROTOSS_WEST_ESCORTS, PointFromId(2080), false);
AIAttackWaveAddWaypoint(gv_p4_PROTOSS_WEST_ESCORTS, PointFromId(2078), false);
}
}
}
void gf_AITerrazineHarvestAttempt (int lp_primaryTerrazineIndex, int lp_secondaryRegionSearchIndex) {
// Variable Declarations
unit lv_harvestingProbe;
int lv_targetTerrazineIndex;
fixed lv_offsetAngle;
int lv_escortCount;
int lv_i;
unitgroup lv_terrazineGroup;
// Automatic Variable Declarations
const int auto16557ECF_ae = 6;
int auto16557ECF_var;
unitgroup autoD682E799_g;
int autoD682E799_u;
unit autoD682E799_var;
int autoD1A8BB6F_val;
int auto7291BAD7_ae;
const int auto7291BAD7_ai = 1;
int autoD3883E60_ae;
const int autoD3883E60_ai = 1;
int auto4A5B622D_ae;
const int auto4A5B622D_ai = 1;
int auto3E772D7A_ae;
const int auto3E772D7A_ai = 1;
int auto3D79AC45_ae;
const int auto3D79AC45_ai = 1;
int autoAE209E35_ae;
const int autoAE209E35_ai = 1;
int autoC2C70BA9_ae;
const int autoC2C70BA9_ai = 1;
int autoF7DDB999_ae;
const int autoF7DDB999_ai = 1;
int autoF6D145CD_ae;
const int autoF6D145CD_ai = 1;
int auto0D7B1014_ae;
const int auto0D7B1014_ai = 1;
// Variable Initialization
lv_terrazineGroup = UnitGroupEmpty();
// Implementation
lv_targetTerrazineIndex = 0;
if ((UnitIsAlive(gv_terrazineNodes[lp_primaryTerrazineIndex]) == true) && (UnitGetCustomValue(gv_terrazineNodes[lp_primaryTerrazineIndex], 4) < 1.0)) {
lv_targetTerrazineIndex = lp_primaryTerrazineIndex;
}
else {
auto16557ECF_var = lp_secondaryRegionSearchIndex;
for ( ; auto16557ECF_var <= auto16557ECF_ae; auto16557ECF_var += 1 ) {
lv_targetTerrazineIndex = gf_GetClosestRawTerrazineToProtoss(auto16557ECF_var);
if ((lv_targetTerrazineIndex != 0)) {
break;
}
}
}
if ((lv_targetTerrazineIndex == 0)) {
lv_terrazineGroup = UnitGroup("TerrazineNode", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
autoD682E799_g = lv_terrazineGroup;
autoD682E799_u = UnitGroupCount(autoD682E799_g, c_unitCountAll);
for (;; autoD682E799_u -= 1) {
autoD682E799_var = UnitGroupUnitFromEnd(autoD682E799_g, autoD682E799_u);
if (autoD682E799_var == null) { break; }
if ((UnitGetCustomValue(autoD682E799_var, 4) > 1.0)) {
UnitGroupRemove(lv_terrazineGroup, autoD682E799_var);
}
}
lv_targetTerrazineIndex = FixedToInt(UnitGetCustomValue(UnitGroupRandomUnit(lv_terrazineGroup, c_unitCountAlive), 0));
}
if ((lv_targetTerrazineIndex == 0)) {
lv_targetTerrazineIndex = gf_GetClosestDroppedTerrazineToProtoss();
}
if ((lv_targetTerrazineIndex == 0)) {
lv_targetTerrazineIndex = FixedToInt(UnitGetCustomValue(UnitGroupRandomUnit(UnitGroup("TerrazineCanister", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive), 0));
}
if ((lv_targetTerrazineIndex == 0)) {
return ;
}
if ((gv_multipleTerrazineSealingState == ge_PRESET_MultipleTerrazineSealingState_Enabled)) {
gv_multipleTerrazineSealingState = ge_PRESET_MultipleTerrazineSealingState_Completed;
gv_multipleTerrazineSealingFirstTarget = lv_targetTerrazineIndex;
TriggerExecute(gt_MultipleTerrazineSealingAttempt, true, false);
}
lv_harvestingProbe = gf_GetClosestProbeToNode(lv_targetTerrazineIndex);
if ((lv_harvestingProbe == null)) {
return ;
}
UnitIssueOrder(lv_harvestingProbe, Order(AbilityCommand("stop", 0)), c_orderQueueReplace);
UnitIssueOrder(lv_harvestingProbe, Order(AbilityCommand("ProbeHarvest", 1)), c_orderQueueAddToEnd);
UnitIssueOrder(lv_harvestingProbe, OrderTargetingUnit(AbilityCommand("ProbeHarvest", 0), gf_NodeMatchingCustomValue(lv_targetTerrazineIndex)), c_orderQueueAddToEnd);
UnitGroupAdd(gv_probeHarvesters, lv_harvestingProbe);
UnitSetCustomValue(lv_harvestingProbe, 2, IntToFixed(lv_targetTerrazineIndex));
UnitSetCustomValue(lv_harvestingProbe, 3, IntToFixed(lp_secondaryRegionSearchIndex));
autoD1A8BB6F_val = gv_protossThreatLevel;
if (autoD1A8BB6F_val == 1) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(1, 1, 2, 3);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
auto7291BAD7_ae = lv_escortCount;
lv_i = 1;
for ( ; ( (auto7291BAD7_ai >= 0 && lv_i <= auto7291BAD7_ae) || (auto7291BAD7_ai < 0 && lv_i >= auto7291BAD7_ae) ) ; lv_i += auto7291BAD7_ai ) {
AIAttackWaveAddEscortType(gv_p4_PROTOSS_WEST_ESCORTS, "Scout", lv_harvestingProbe, 3.5, (lv_offsetAngle * IntToFixed(lv_i)));
}
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
}
else if (autoD1A8BB6F_val == 2) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(2, 2, 3, 3);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
autoD3883E60_ae = lv_escortCount;
lv_i = 1;
for ( ; ( (autoD3883E60_ai >= 0 && lv_i <= autoD3883E60_ae) || (autoD3883E60_ai < 0 && lv_i >= autoD3883E60_ae) ) ; lv_i += autoD3883E60_ai ) {
AIAttackWaveAddEscortType(gv_p4_PROTOSS_WEST_ESCORTS, "Scout", lv_harvestingProbe, 3.5, (lv_offsetAngle * IntToFixed(lv_i)));
}
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
}
else if (autoD1A8BB6F_val == 3) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(0, 0, 1, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(2, 2, 3, 3);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
auto4A5B622D_ae = lv_escortCount;
lv_i = 1;
for ( ; ( (auto4A5B622D_ai >= 0 && lv_i <= auto4A5B622D_ae) || (auto4A5B622D_ai < 0 && lv_i >= auto4A5B622D_ae) ) ; lv_i += auto4A5B622D_ai ) {
AIAttackWaveAddEscortType(gv_p4_PROTOSS_WEST_ESCORTS, "Scout", lv_harvestingProbe, 3.5, (lv_offsetAngle * IntToFixed(lv_i)));
}
lv_escortCount = libNtve_gf_DifficultyValueInt(1, 1, 2, 2);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
auto3E772D7A_ae = lv_escortCount;
lv_i = 1;
for ( ; ( (auto3E772D7A_ai >= 0 && lv_i <= auto3E772D7A_ae) || (auto3E772D7A_ai < 0 && lv_i >= auto3E772D7A_ae) ) ; lv_i += auto3E772D7A_ai ) {
AIAttackWaveAddEscortType(gv_p4_PROTOSS_WEST_ESCORTS, "VoidRay", lv_harvestingProbe, 1.5, (lv_offsetAngle * IntToFixed(lv_i)));
}
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
}
else if (autoD1A8BB6F_val == 4) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(1, 1, 2, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(2, 2, 3, 3);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
auto3D79AC45_ae = lv_escortCount;
lv_i = 1;
for ( ; ( (auto3D79AC45_ai >= 0 && lv_i <= auto3D79AC45_ae) || (auto3D79AC45_ai < 0 && lv_i >= auto3D79AC45_ae) ) ; lv_i += auto3D79AC45_ai ) {
AIAttackWaveAddEscortType(gv_p4_PROTOSS_WEST_ESCORTS, "Scout", lv_harvestingProbe, 3.5, (lv_offsetAngle * IntToFixed(lv_i)));
}
lv_escortCount = libNtve_gf_DifficultyValueInt(1, 1, 2, 2);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
autoAE209E35_ae = lv_escortCount;
lv_i = 1;
for ( ; ( (autoAE209E35_ai >= 0 && lv_i <= autoAE209E35_ae) || (autoAE209E35_ai < 0 && lv_i >= autoAE209E35_ae) ) ; lv_i += autoAE209E35_ai ) {
AIAttackWaveAddEscortType(gv_p4_PROTOSS_WEST_ESCORTS, "VoidRay", lv_harvestingProbe, 1.5, (lv_offsetAngle * IntToFixed(lv_i)));
}
AIAttackWaveAddUnits4(0, 0, 1, 1, "Observer");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
}
else if (autoD1A8BB6F_val == 5) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(2, 2, 3, 3, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
lv_escortCount = libNtve_gf_DifficultyValueInt(2, 2, 3, 4);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
autoC2C70BA9_ae = lv_escortCount;
lv_i = 1;
for ( ; ( (autoC2C70BA9_ai >= 0 && lv_i <= autoC2C70BA9_ae) || (autoC2C70BA9_ai < 0 && lv_i >= autoC2C70BA9_ae) ) ; lv_i += autoC2C70BA9_ai ) {
AIAttackWaveAddEscortType(gv_p4_PROTOSS_WEST_ESCORTS, "Scout", lv_harvestingProbe, 3.5, (lv_offsetAngle * IntToFixed(lv_i)));
}
lv_escortCount = libNtve_gf_DifficultyValueInt(1, 1, 2, 2);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
autoF7DDB999_ae = lv_escortCount;
lv_i = 1;
for ( ; ( (autoF7DDB999_ai >= 0 && lv_i <= autoF7DDB999_ae) || (autoF7DDB999_ai < 0 && lv_i >= autoF7DDB999_ae) ) ; lv_i += autoF7DDB999_ai ) {
AIAttackWaveAddEscortType(gv_p4_PROTOSS_WEST_ESCORTS, "VoidRay", lv_harvestingProbe, 1.5, (lv_offsetAngle * IntToFixed(lv_i)));
}
AIAttackWaveAddUnits4(0, 1, 1, 1, "Observer");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
}
else if (autoD1A8BB6F_val == 6) {
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(2, 2, 3, 2, "Stalker");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
AIAttackWaveSetTargetEscortNL(gv_p4_PROTOSS_WEST_ESCORTS, libNtve_gf_ConvertUnitToUnitGroup(lv_harvestingProbe), 0);
AIAttackWaveAddUnits4(0, 0, 0, 1, "Colossus");
lv_escortCount = libNtve_gf_DifficultyValueInt(3, 3, 4, 4);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
autoF6D145CD_ae = lv_escortCount;
lv_i = 1;
for ( ; ( (autoF6D145CD_ai >= 0 && lv_i <= autoF6D145CD_ae) || (autoF6D145CD_ai < 0 && lv_i >= autoF6D145CD_ae) ) ; lv_i += autoF6D145CD_ai ) {
AIAttackWaveAddEscortType(gv_p4_PROTOSS_WEST_ESCORTS, "Scout", lv_harvestingProbe, 3.5, (lv_offsetAngle * IntToFixed(lv_i)));
}
lv_escortCount = libNtve_gf_DifficultyValueInt(1, 1, 2, 2);
lv_offsetAngle = gf_CalculateOffset(IntToFixed(lv_escortCount));
auto0D7B1014_ae = lv_escortCount;
lv_i = 1;
for ( ; ( (auto0D7B1014_ai >= 0 && lv_i <= auto0D7B1014_ae) || (auto0D7B1014_ai < 0 && lv_i >= auto0D7B1014_ae) ) ; lv_i += auto0D7B1014_ai ) {
AIAttackWaveAddEscortType(gv_p4_PROTOSS_WEST_ESCORTS, "VoidRay", lv_harvestingProbe, 1.5, (lv_offsetAngle * IntToFixed(lv_i)));
}
AIAttackWaveAddUnits4(1, 1, 1, 1, "Observer");
AIAttackWaveSend(gv_p4_PROTOSS_WEST_ESCORTS, 0, false);
}
else {
}
}
fixed gf_CalculateOffset (fixed lp_real) {
// Automatic Variable Declarations
// Implementation
if ((lp_real > 0.0)) {
return (360.0 / lp_real);
}
return 0.0;
}
int gf_GetClosestRawTerrazineToProtoss (int lp_regionToCheck) {
// Variable Declarations
int lv_closestNodeIndex;
fixed lv_closestNodeMinDistance;
fixed lv_checkDistance;
unitgroup lv_terrazineGroup;
// Automatic Variable Declarations
unitgroup autoA7EA04C4_g;
int autoA7EA04C4_u;
unit autoA7EA04C4_var;
unitgroup auto96AA0583_g;
int auto96AA0583_u;
unit auto96AA0583_var;
// Variable Initialization
lv_terrazineGroup = UnitGroupEmpty();
// Implementation
lv_closestNodeIndex = 0;
lv_terrazineGroup = UnitGroup("TerrazineNode", c_playerAny, gv_terrazineRegions[lp_regionToCheck], UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
autoA7EA04C4_g = lv_terrazineGroup;
autoA7EA04C4_u = UnitGroupCount(autoA7EA04C4_g, c_unitCountAll);
for (;; autoA7EA04C4_u -= 1) {
autoA7EA04C4_var = UnitGroupUnitFromEnd(autoA7EA04C4_g, autoA7EA04C4_u);
if (autoA7EA04C4_var == null) { break; }
if ((UnitGetCustomValue(autoA7EA04C4_var, 4) > 1.0)) {
UnitGroupRemove(lv_terrazineGroup, autoA7EA04C4_var);
}
}
auto96AA0583_g = lv_terrazineGroup;
auto96AA0583_u = UnitGroupCount(auto96AA0583_g, c_unitCountAll);
for (;; auto96AA0583_u -= 1) {
auto96AA0583_var = UnitGroupUnitFromEnd(auto96AA0583_g, auto96AA0583_u);
if (auto96AA0583_var == null) { break; }
lv_checkDistance = DistanceBetweenPoints(UnitGetPosition(auto96AA0583_var), PointFromId(13));
if ((lv_closestNodeMinDistance == 0.0)) {
lv_closestNodeMinDistance = lv_checkDistance;
lv_closestNodeIndex = FixedToInt(UnitGetCustomValue(auto96AA0583_var, 0));
}
else {
if ((lv_checkDistance < lv_closestNodeMinDistance)) {
lv_closestNodeMinDistance = lv_checkDistance;
lv_closestNodeIndex = FixedToInt(UnitGetCustomValue(auto96AA0583_var, 0));
}
}
}
return lv_closestNodeIndex;
}
int gf_GetClosestDroppedTerrazineToProtoss () {
// Variable Declarations
int lv_closestNodeIndex;
fixed lv_closestNodeMinDistance;
fixed lv_checkDistance;
// Automatic Variable Declarations
unitgroup auto7CD40DCB_g;
int auto7CD40DCB_u;
unit auto7CD40DCB_var;
// Variable Initialization
// Implementation
lv_closestNodeIndex = 0;
auto7CD40DCB_g = UnitGroup("TerrazineCanister", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto7CD40DCB_u = UnitGroupCount(auto7CD40DCB_g, c_unitCountAll);
for (;; auto7CD40DCB_u -= 1) {
auto7CD40DCB_var = UnitGroupUnitFromEnd(auto7CD40DCB_g, auto7CD40DCB_u);
if (auto7CD40DCB_var == null) { break; }
lv_checkDistance = DistanceBetweenPoints(UnitGetPosition(auto7CD40DCB_var), PointFromId(13));
if ((lv_closestNodeMinDistance == 0.0)) {
lv_closestNodeMinDistance = lv_checkDistance;
lv_closestNodeIndex = FixedToInt(UnitGetCustomValue(auto7CD40DCB_var, 0));
}
else {
if ((lv_checkDistance < lv_closestNodeMinDistance)) {
lv_closestNodeMinDistance = lv_checkDistance;
lv_closestNodeIndex = FixedToInt(UnitGetCustomValue(auto7CD40DCB_var, 0));
}
}
}
return lv_closestNodeIndex;
}
unit gf_GetClosestProbeToNode (int lp_canisterHarvestTargetIndex) {
// Variable Declarations
unit lv_probe01;
unit lv_probe02;
fixed lv_probe01DistanceToCanister;
fixed lv_probe02DistanceToCanister;
unit lv_probeFallback;
unit lv_canisterHarvestTarget;
unit lv_pickedUnit;
// Automatic Variable Declarations
unitgroup auto8AAC8CF7_g;
int auto8AAC8CF7_u;
// Variable Initialization
// Implementation
auto8AAC8CF7_g = UnitGroup("TerrazineNode", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, 0, 0), 0);
auto8AAC8CF7_u = UnitGroupCount(auto8AAC8CF7_g, c_unitCountAll);
for (;; auto8AAC8CF7_u -= 1) {
lv_pickedUnit = UnitGroupUnitFromEnd(auto8AAC8CF7_g, auto8AAC8CF7_u);
if (lv_pickedUnit == null) { break; }
if ((FixedToInt(UnitGetCustomValue(lv_pickedUnit, 0)) == lp_canisterHarvestTargetIndex)) {
lv_canisterHarvestTarget = lv_pickedUnit;
break;
}
}
lv_probe01 = UnitGroupRandomUnit(UnitGroup("Probe", c_playerAny, RegionFromId(36), UnitFilter(0, 0, 0, 0), 0), c_unitCountAlive);
lv_probe01DistanceToCanister = DistanceBetweenPoints(UnitGetPosition(lv_probe01), UnitGetPosition(lv_canisterHarvestTarget));
lv_probe02 = UnitGroupRandomUnit(UnitGroup("Probe", c_playerAny, RegionFromId(38), UnitFilter(0, 0, 0, 0), 0), c_unitCountAlive);
lv_probe02DistanceToCanister = DistanceBetweenPoints(UnitGetPosition(lv_probe02), UnitGetPosition(lv_canisterHarvestTarget));
if ((lv_probe01DistanceToCanister <= lv_probe02DistanceToCanister)) {
return lv_probe01;
}
if ((lv_probe02DistanceToCanister < lv_probe01DistanceToCanister)) {
return lv_probe02;
}
return null;
}
unit gf_NodeMatchingCustomValue (int lp_param_TerrazineIndex) {
// Variable Declarations
unit lv_lv_TargetTerrazineGas;
unit lv_pickedUnit;
// Automatic Variable Declarations
unitgroup auto9C5AF31A_g;
int auto9C5AF31A_u;
unitgroup auto515F8EF4_g;
int auto515F8EF4_u;
// Variable Initialization
// Implementation
auto9C5AF31A_g = UnitGroup("TerrazineNode", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, 0, 0), 0);
auto9C5AF31A_u = UnitGroupCount(auto9C5AF31A_g, c_unitCountAll);
for (;; auto9C5AF31A_u -= 1) {
lv_pickedUnit = UnitGroupUnitFromEnd(auto9C5AF31A_g, auto9C5AF31A_u);
if (lv_pickedUnit == null) { break; }
if ((FixedToInt(UnitGetCustomValue(lv_pickedUnit, 0)) == lp_param_TerrazineIndex)) {
return lv_pickedUnit;
}
}
auto515F8EF4_g = UnitGroup("TerrazineCanister", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, 0, 0), 0);
auto515F8EF4_u = UnitGroupCount(auto515F8EF4_g, c_unitCountAll);
for (;; auto515F8EF4_u -= 1) {
lv_pickedUnit = UnitGroupUnitFromEnd(auto515F8EF4_g, auto515F8EF4_u);
if (lv_pickedUnit == null) { break; }
if ((FixedToInt(UnitGetCustomValue(lv_pickedUnit, 0)) == lp_param_TerrazineIndex)) {
return lv_pickedUnit;
}
}
return null;
}
void gf_ResearchForAllProtoss (string lp_upgrade) {
// Variable Declarations
int lv_p;
// Automatic Variable Declarations
playergroup autoBEC5C0B3_g;
// Variable Initialization
// Implementation
autoBEC5C0B3_g = gv_protossPlayerGroup;
lv_p = -1;
while (true) {
lv_p = PlayerGroupNextPlayer(autoBEC5C0B3_g, lv_p);
if (lv_p < 0) { break; }
TechTreeUpgradeAddLevel(lv_p, lp_upgrade, 1);
}
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialization
//--------------------------------------------------------------------------------------------------
bool gt_Initialization_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libCamp_gf_LoadCampaignData(libCamp_ge_MapID_MapTTosh02);
TriggerExecute(gt_Init01Technology, true, false);
TriggerExecute(gt_Init02Players, true, true);
TriggerExecute(gt_Init03VariablesUnits, true, true);
TriggerExecute(gt_Init04Music, true, true);
TriggerExecute(gt_Init05Environment, true, true);
TriggerExecute(gt_Init06Difficulty, true, true);
TriggerExecute(gt_Init07Help, true, true);
libCamp_gf_RegisterFootageRecording(gt_BriefingQ);
libCamp_gf_PurchaseStorymodeTech();
TriggerExecute(gt_IntroSequence, true, false);
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Initialization_Init () {
gt_Initialization = TriggerCreate("gt_Initialization_Func");
TriggerAddEventMapInit(gt_Initialization);
}
//--------------------------------------------------------------------------------------------------
// Trigger: Init 01 Technology
//--------------------------------------------------------------------------------------------------
bool gt_Init01Technology_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libCamp_gf_SetTechRestrictionsCallback(TriggerGetCurrent());
TechTreeUpgradeAddLevel(gv_p2_PROTOSS_EAST_ATTACKERS, "BlinkTech", 1);
TechTreeUpgradeAddLevel(gv_p4_PROTOSS_WEST_ESCORTS, "BlinkTech", 1);
libCamp_gf_EnableCampaignTechUnit(true, libCamp_ge_StoryTechGroup_StoryTechGroupVehiclesGoliath, gv_p1_USER);
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Init01Technology_Init () {
gt_Init01Technology = TriggerCreate("gt_Init01Technology_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Init 02 Players
//--------------------------------------------------------------------------------------------------
bool gt_Init02Players_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
playergroup autoA366C10A_g;
int autoA366C10A_var;
// Actions
if (!runActions) {
return true;
}
PlayerGroupAdd(gv_protossPlayerGroup, gv_p2_PROTOSS_EAST_ATTACKERS);
PlayerGroupAdd(gv_protossPlayerGroup, gv_p3_PROTOSS_SCRIPTED);
PlayerGroupAdd(gv_protossPlayerGroup, gv_p4_PROTOSS_WEST_ESCORTS);
libNtve_gf_SetAlliance(gv_p1_USER, gv_p5_TERRAZINE, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAlliance(gv_p2_PROTOSS_EAST_ATTACKERS, gv_p3_PROTOSS_SCRIPTED, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_p2_PROTOSS_EAST_ATTACKERS, gv_p4_PROTOSS_WEST_ESCORTS, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_p2_PROTOSS_EAST_ATTACKERS, gv_p5_TERRAZINE, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAlliance(gv_p3_PROTOSS_SCRIPTED, gv_p4_PROTOSS_WEST_ESCORTS, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_p3_PROTOSS_SCRIPTED, gv_p5_TERRAZINE, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAlliance(gv_p4_PROTOSS_WEST_ESCORTS, gv_p5_TERRAZINE, libNtve_ge_AllianceSetting_Neutral);
autoA366C10A_g = gv_protossPlayerGroup;
autoA366C10A_var = -1;
while (true) {
autoA366C10A_var = PlayerGroupNextPlayer(autoA366C10A_g, autoA366C10A_var);
if (autoA366C10A_var < 0) { break; }
PlayerSetColorIndex(autoA366C10A_var, 3, true);
}
PlayerModifyPropertyInt(gv_p1_USER, c_playerPropMinerals, c_playerPropOperSetTo, 300);
PlayerModifyPropertyInt(gv_p1_USER, c_playerPropVespene, c_playerPropOperSetTo, 100);
PlayerModifyPropertyInt(gv_p2_PROTOSS_EAST_ATTACKERS, c_playerPropMinerals, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_p2_PROTOSS_EAST_ATTACKERS, c_playerPropVespene, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_p3_PROTOSS_SCRIPTED, c_playerPropMinerals, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_p3_PROTOSS_SCRIPTED, c_playerPropVespene, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_p4_PROTOSS_WEST_ESCORTS, c_playerPropMinerals, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_p4_PROTOSS_WEST_ESCORTS, c_playerPropVespene, c_playerPropOperSetTo, 5000);
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Init02Players_Init () {
gt_Init02Players = TriggerCreate("gt_Init02Players_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Init 03 Variables/Units
//--------------------------------------------------------------------------------------------------
bool gt_Init03VariablesUnits_Func (bool testConds, bool runActions) {
// Variable Declarations
bool lv_playerHasMercTech;
int lv_merc;
// Automatic Variable Declarations
unitgroup auto2AD203C4_g;
int auto2AD203C4_u;
unit auto2AD203C4_var;
unitgroup auto7718831C_g;
int auto7718831C_u;
unit auto7718831C_var;
// Variable Initialization
lv_merc = libCamp_ge_StoryMercID_MercNone;
// Actions
if (!runActions) {
return true;
}
gv_bonusObjectiveCollectRelicsNeeded = UnitGroupCount(UnitGroup("ProtossRelic", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive);
auto2AD203C4_g = UnitGroup("ProtossRelic", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto2AD203C4_u = UnitGroupCount(auto2AD203C4_g, c_unitCountAll);
for (;; auto2AD203C4_u -= 1) {
auto2AD203C4_var = UnitGroupUnitFromEnd(auto2AD203C4_g, auto2AD203C4_u);
if (auto2AD203C4_var == null) { break; }
UnitSetInfoText(auto2AD203C4_var, StringExternal("Param/Value/77033FDB"), StringExternal("Param/Value/8985286D"), StringToText(""));
UnitSetState(auto2AD203C4_var, c_unitStateTooltipable, true);
}
gv_superWarpGateP3NoAI = UnitFromId(68);
libNtve_gf_ShowHideUnit(UnitFromId(68), false);
TriggerExecute(gt_InitNERelicDefenders, true, false);
UnitGroupAdd(gv_harvestingSpeedBumpNWBullies, UnitFromId(879));
UnitGroupAdd(gv_harvestingSpeedBumpNWBullies, UnitFromId(880));
UnitGroupAdd(gv_harvestingSpeedBumpNWBullies, UnitFromId(64));
UnitGroupAdd(gv_harvestingSpeedBumpNWBullies, UnitFromId(84));
UnitGroupAdd(gv_harvestingSpeedBumpCentralBullies, UnitFromId(90));
UnitGroupAdd(gv_harvestingSpeedBumpCentralBullies, UnitFromId(253));
UnitGroupAdd(gv_harvestingSpeedBumpCentralBullies, UnitFromId(1586));
UnitGroupAdd(gv_harvestingSpeedBumpCentralBullies, UnitFromId(962));
UnitSetCustomValue(UnitFromId(34), 0, 1.0);
gv_terrazineNodes[1] = UnitFromId(34);
UnitSetCustomValue(UnitFromId(70), 0, 2.0);
gv_terrazineNodes[2] = UnitFromId(70);
UnitSetCustomValue(UnitFromId(78), 0, 3.0);
gv_terrazineNodes[3] = UnitFromId(78);
UnitSetCustomValue(UnitFromId(35), 0, 4.0);
gv_terrazineNodes[4] = UnitFromId(35);
UnitSetCustomValue(UnitFromId(24), 0, 5.0);
gv_terrazineNodes[5] = UnitFromId(24);
UnitSetCustomValue(UnitFromId(81), 0, 6.0);
gv_terrazineNodes[6] = UnitFromId(81);
UnitSetCustomValue(UnitFromId(27), 0, 7.0);
gv_terrazineNodes[7] = UnitFromId(27);
UnitSetCustomValue(UnitFromId(30), 0, 8.0);
gv_terrazineNodes[8] = UnitFromId(30);
UnitSetCustomValue(UnitFromId(28), 0, 9.0);
gv_terrazineNodes[9] = UnitFromId(28);
UnitSetCustomValue(UnitFromId(29), 0, 10.0);
gv_terrazineNodes[10] = UnitFromId(29);
UnitSetCustomValue(UnitFromId(94), 0, 11.0);
gv_terrazineNodes[11] = UnitFromId(94);
UnitSetCustomValue(UnitFromId(79), 0, 12.0);
gv_terrazineNodes[12] = UnitFromId(79);
UnitSetCustomValue(UnitFromId(32), 0, 13.0);
gv_terrazineNodes[13] = UnitFromId(32);
auto7718831C_g = UnitGroup("TerrazineNode", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto7718831C_u = UnitGroupCount(auto7718831C_g, c_unitCountAll);
for (;; auto7718831C_u -= 1) {
auto7718831C_var = UnitGroupUnitFromEnd(auto7718831C_g, auto7718831C_u);
if (auto7718831C_var == null) { break; }
libNtve_gf_PlayAnimation(libNtve_gf_MainActorofUnit(auto7718831C_var), c_animNameDefault, "Stand", c_animFlagPlayForever, c_animTimeDefault);
UnitSetInfoText(auto7718831C_var, StringExternal("Param/Value/F03BE3FA"), StringToText(""), StringToText(""));
}
gv_terrazineRegions[1] = RegionFromId(31);
gv_terrazineRegions[2] = RegionFromId(15);
gv_terrazineRegions[3] = RegionFromId(29);
gv_terrazineRegions[4] = RegionFromId(2);
gv_terrazineRegions[5] = RegionFromId(22);
gv_terrazineRegions[6] = RegionFromId(24);
libNtve_gf_MakeUnitInvulnerable(gv_victoryTerrazine, true);
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Init03VariablesUnits_Init () {
gt_Init03VariablesUnits = TriggerCreate("gt_Init03VariablesUnits_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Init 04 Music
//--------------------------------------------------------------------------------------------------
bool gt_Init04Music_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
SoundtrackDefault(PlayerGroupAll(), c_soundtrackCategoryMusic, "TTosh02MusicMain", c_soundtrackCueAny, c_soundtrackIndexAny);
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Init04Music_Init () {
gt_Init04Music = TriggerCreate("gt_Init04Music_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Init 05 Environment
//--------------------------------------------------------------------------------------------------
bool gt_Init05Environment_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
GameTimeOfDaySet("08:00:00");
libNtve_gf_PlayAnimationOnDoodadsInRegion(RegionEntireMap(), "RainSprinkle", c_animNameDefault, "Death", c_animFlagPlayForever, c_animTimeDefault);
GameSetBackground(c_backgroundFixed, null, 100.0);
VisRevealArea(gv_p1_USER, RegionFromId(27), 0.1, false);
libLbty_gf_AutoRevealRegion(RegionFromId(28), RegionFromId(26), gv_p1_USER);
libLbty_gf_AutoRevealRegion(RegionFromId(32), RegionFromId(33), gv_p1_USER);
libLbty_gf_AutoRevealRegion(RegionFromId(35), RegionFromId(34), gv_p1_USER);
libLbty_gf_AutoRevealRegion(RegionFromId(39), RegionFromId(37), gv_p1_USER);
libLbty_gf_AutoRevealRegion(RegionFromId(41), RegionFromId(40), gv_p1_USER);
libLbty_gf_AutoRevealRegion(RegionFromId(45), RegionFromId(44), gv_p1_USER);
libLbty_gf_AutoRevealRegion(RegionFromId(43), RegionFromId(42), gv_p1_USER);
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Init05Environment_Init () {
gt_Init05Environment = TriggerCreate("gt_Init05Environment_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Init 06 Difficulty
//--------------------------------------------------------------------------------------------------
bool gt_Init06Difficulty_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
playergroup auto3A30A2F6_g;
int auto3A30A2F6_var;
// Actions
if (!runActions) {
return true;
}
if ((PlayerDifficulty(gv_p1_USER) == 1)) {
PlayerModifyPropertyInt(gv_p2_PROTOSS_EAST_ATTACKERS, c_playerPropHandicap, c_playerPropOperSetTo, 50);
PlayerModifyPropertyInt(gv_p3_PROTOSS_SCRIPTED, c_playerPropHandicap, c_playerPropOperSetTo, 50);
PlayerModifyPropertyInt(gv_p4_PROTOSS_WEST_ESCORTS, c_playerPropHandicap, c_playerPropOperSetTo, 50);
}
gv_playerCollectionQuota = libNtve_gf_DifficultyValueInt(7, 7, 7, 7);
gv_protossCollectionQuota = libNtve_gf_DifficultyValueInt(7, 7, 7, 7);
auto3A30A2F6_g = gv_protossPlayerGroup;
auto3A30A2F6_var = -1;
while (true) {
auto3A30A2F6_var = PlayerGroupNextPlayer(auto3A30A2F6_g, auto3A30A2F6_var);
if (auto3A30A2F6_var < 0) { break; }
TechTreeUpgradeAddLevel(auto3A30A2F6_var, "ProtossShieldsLevel1", libNtve_gf_DifficultyValueInt(0, 0, 1, 1));
TechTreeUpgradeAddLevel(auto3A30A2F6_var, "PsiStormTech", libNtve_gf_DifficultyValueInt(0, 0, 1, 1));
TechTreeUpgradeAddLevel(auto3A30A2F6_var, "ProtossGroundArmorsLevel1", libNtve_gf_DifficultyValueInt(0, 0, 0, 1));
TechTreeUpgradeAddLevel(auto3A30A2F6_var, "ObserverGraviticBooster", 1);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Init06Difficulty_Init () {
gt_Init06Difficulty = TriggerCreate("gt_Init06Difficulty_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Init 07 Help
//--------------------------------------------------------------------------------------------------
bool gt_Init07Help_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libCamp_gf_AddUnitTypeToUnitHelpPanel("Probe", false, gv_p1_USER);
libCamp_gf_AddUnitTypeToUnitHelpPanel("Zealot", false, gv_p1_USER);
libCamp_gf_AddUnitTypeToUnitHelpPanel("Stalker", false, gv_p1_USER);
libCamp_gf_AddUnitTypeToUnitHelpPanel("Immortal", false, gv_p1_USER);
libCamp_gf_AddUnitTypeToUnitHelpPanel("Scout", false, gv_p1_USER);
libCamp_gf_AddUnitTypeToUnitHelpPanel("Observer", false, gv_p1_USER);
libCamp_gf_AddUnitTypeToUnitHelpPanel("VoidRay", false, gv_p1_USER);
libCamp_gf_AddUnitTypeToUnitHelpPanel("PhotonCannon", false, gv_p1_USER);
libCamp_gf_AddUnitTypeToUnitHelpPanel("HighTemplar", false, gv_p1_USER);
libCamp_gf_AddUnitTypeToUnitHelpPanel("WarpPrism", false, gv_p1_USER);
if ((libNtve_gf_DifficultyValueInt(0, 0, 1, 1) == 1)) {
libCamp_gf_AddUnitTypeToUnitHelpPanel("Colossus", false, gv_p1_USER);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Init07Help_Init () {
gt_Init07Help = TriggerCreate("gt_Init07Help_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Intro Sequence
//--------------------------------------------------------------------------------------------------
bool gt_IntroSequence_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
CinematicFade(false, 0.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, false);
libNtve_gf_CinematicMode(true, PlayerGroupAll(), 0.0);
libNtve_gf_GlobalCinematicSetting(true);
TriggerExecute(gt_StartAI, true, false);
Wait(0.1, c_timeGame);
UIAlertPoint("Trigger", gv_p1_USER, StringExternal("Param/Value/20E5CE1C"), null, PointFromId(10));
libNtve_gf_CinematicMode(false, PlayerGroupAll(), 1.5);
libNtve_gf_GlobalCinematicSetting(false);
libNtve_gf_SwooshCamera(gv_p1_USER, ((CameraInfoGetValue(CameraInfoDefault(), c_cameraValueDistance)) + 8.0), CameraInfoGetValue(CameraInfoDefault(), c_cameraValueDistance), PlayerStartLocation(gv_p1_USER), 1.5);
CinematicFade(true, 1.5, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, true);
TriggerExecute(gt_StartGame, true, false);
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_IntroSequence_Init () {
gt_IntroSequence = TriggerCreate("gt_IntroSequence_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Start Game
//--------------------------------------------------------------------------------------------------
bool gt_StartGame_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libNtve_gf_ShareVisionofUnit(UnitFromId(34), true, gv_p1_USER);
TimerStart(gv_protossAggroTimer, 180.0, false, c_timeGame);
Wait(3.0, c_timeReal);
TriggerExecute(gt_PrimaryObjectiveCollectTerrazineCreateQ, true, true);
Wait(8.0, c_timeReal);
TriggerExecute(gt_GoliathandGatherTerrazineTipsQ, true, false);
Wait(8.0, c_timeReal);