/
MapScript.galaxy
7353 lines (6660 loc) · 320 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: Shatter the Sky
//
//==================================================================================================
include "TriggerLibs/NativeLib"
include "TriggerLibs/LibertyLib"
include "TriggerLibs/CampaignLib"
//--------------------------------------------------------------------------------------------------
// Library Initialization
//--------------------------------------------------------------------------------------------------
void InitLibs () {
libNtve_InitLib();
libLbty_InitLib();
libCamp_InitLib();
}
//--------------------------------------------------------------------------------------------------
// Constants
//--------------------------------------------------------------------------------------------------
const int gv_pLAYER_P01_USER = 1;
const int gv_pLAYER_P02_COOLANT_TOWERS = 2;
const int gv_pLAYER_P03_ZERG_BR = 3;
const int gv_pLAYER_P04_ZERG_BL = 4;
const int gv_pLAYER_P05_ZERG_TL = 5;
const int gv_pLAYER_P06_ZERG_TR = 6;
const int gv_pLAYER_P07_ZERG_EXP = 7;
const int gv_pLAYER_P08_MUTALISK_TOWERS = 8;
const int gv_pLAYER_P09_HORNER = 9;
const int gv_pLAYER_P10_LEVIATHAN = 10;
const int gv_pLAYER_P11_PLATFORM_PIECES = 11;
//--------------------------------------------------------------------------------------------------
// Global Structures
//--------------------------------------------------------------------------------------------------
struct gs_RECORD_UnitArea01 {
string lv_unitType;
int lv_player;
point lv_position;
fixed lv_facing;
};
struct gs_RECORD_UnitArea02 {
string lv_unitType;
int lv_player;
point lv_position;
fixed lv_facing;
};
struct gs_RECORD_UnitArea03 {
string lv_unitType;
int lv_player;
point lv_position;
fixed lv_facing;
};
struct gs_RECORD_UnitArea04 {
string lv_unitType;
int lv_player;
point lv_position;
fixed lv_facing;
};
//--------------------------------------------------------------------------------------------------
// Global Variables
//--------------------------------------------------------------------------------------------------
bool gv_gameOver;
bool gv_inCinematic;
revealer gv_startingMapRevealer;
unitgroup gv_hiddenUnits;
unitgroup gv_pATHINGBLOCKERAREA01;
unitgroup gv_pATHINGBLOCKERAREA02;
unitgroup gv_pATHINGBLOCKERAREA03;
unitgroup gv_pATHINGBLOCKERAREA04;
bool gv_midCinePlayed;
int gv_fleetLinesGiven;
int gv_objectiveLeviathanPing;
fixed gv_leviathanMaxLife;
fixed gv_leviathanMaxEnergy;
playergroup gv_zergPlayers;
timer gv_platformDelayTimer;
timer gv_achievementHardTimer;
gs_RECORD_UnitArea01[101] gv_unitsArea01;
gs_RECORD_UnitArea02[101] gv_unitsArea02;
gs_RECORD_UnitArea03[101] gv_unitsArea03;
gs_RECORD_UnitArea04[101] gv_unitsArea04;
int gv_numberOfUnitsArea01;
int gv_numberOfUnitsArea02;
int gv_numberOfUnitsArea03;
int gv_numberOfUnitsArea04;
int gv_inCombatIndicator;
region gv_ground0;
region gv_ground1;
region gv_ground2;
region gv_ground3;
region gv_ground4;
region gv_ground5;
region gv_ground6;
region gv_ground7;
region gv_ground8;
region gv_ground9;
region gv_ground10;
region gv_ground11;
point gv_leviathanGuardArea;
region gv_leviathanSpawnRegion;
int gv_cinematicNumber;
timer gv_leviathanDeathWindow;
timer gv_platformBlowsTimerArea01;
timer gv_platformBlowsTimerArea02;
timer gv_platformBlowsTimerArea03;
timer gv_platformBlowsTimerArea04;
unit gv_leviathan;
unitgroup gv_leviathanMutaGroup;
bool gv_timerReadytoBlowArea01;
bool gv_timerReadytoBlowArea02;
bool gv_timerReadytoBlowArea03;
bool gv_timerReadytoBlowArea04;
fixed gv_cMutaRadiusCheckFast;
int gv_cMutaSpewSizeSlow;
int gv_cMutaSpewSizeFast;
unitgroup[51] gv_mutaDefenders;
fixed gv_cMutaRadiusCheckSlow;
fixed gv_cMutaSpawnPeriodFast;
fixed gv_cMutaSpawnPeriodSlow;
int gv_mutaSpawnMax;
int gv_ventPing01;
unit gv_firstMutaSpawner;
bool gv_alternateLastWave;
int gv_stat_PlayerUnitsLostToPlatform;
int gv_stat_ZergKilledByPlatform;
int gv_stat_UnitsLostToEnemies;
actor gv_objectivePlatformsActor01;
actor gv_objectivePlatformsActor02;
actor gv_objectivePlatformsActor03;
actor gv_objectivePlatformsActor04;
int gv_objectivePlatformsPing01;
int gv_objectivePlatformsPing02;
int gv_objectivePlatformsPing03;
int gv_objectivePlatformsPing04;
int gv_objectiveKillLeviathan;
int gv_objectiveDestroyCoolantTowers;
int gv_objectiveDestroyCoolantTowersTotal;
int gv_objectiveDestroyCoolantTowerProgress;
actor gv_briefingTargetingCursor;
bool gv_midCinematicIsBusy;
bool gv_midPlatformsCinematicCompleted;
unitgroup gv_midPlatformsHiddenUnitGroup;
revealer gv_midPlatformsRevealer;
int gv_midCinematicCount;
bool gv_midLeviathanCinematicCompleted;
unitgroup gv_midLeviathanHiddenUnitGroup;
unit gv_leviathanCINE;
bool gv_victoryCinematicCompleted;
unitgroup gv_victoryHiddenUnitGroup;
revealer gv_victoryRevealer;
void InitGlobals () {
int init_i;
gv_hiddenUnits = UnitGroupEmpty();
gv_pATHINGBLOCKERAREA01 = UnitGroupEmpty();
gv_pATHINGBLOCKERAREA02 = UnitGroupEmpty();
gv_pATHINGBLOCKERAREA03 = UnitGroupEmpty();
gv_pATHINGBLOCKERAREA04 = UnitGroupEmpty();
gv_zergPlayers = PlayerGroupEmpty();
gv_platformDelayTimer = TimerCreate();
gv_achievementHardTimer = TimerCreate();
gv_leviathanDeathWindow = TimerCreate();
gv_platformBlowsTimerArea01 = TimerCreate();
gv_platformBlowsTimerArea02 = TimerCreate();
gv_platformBlowsTimerArea03 = TimerCreate();
gv_platformBlowsTimerArea04 = TimerCreate();
gv_leviathanMutaGroup = UnitGroupEmpty();
for (init_i = 0; init_i <= 50; init_i += 1) {
gv_mutaDefenders[init_i] = UnitGroupEmpty();
}
gv_objectiveKillLeviathan = c_invalidObjectiveId;
gv_objectiveDestroyCoolantTowers = c_invalidObjectiveId;
gv_midPlatformsHiddenUnitGroup = UnitGroupEmpty();
gv_midLeviathanHiddenUnitGroup = UnitGroupEmpty();
gv_victoryHiddenUnitGroup = UnitGroupEmpty();
}
//--------------------------------------------------------------------------------------------------
// Global Function Declarations
//--------------------------------------------------------------------------------------------------
bool gf_PlayerIsInCombat (int lp_player);
void gf_BlowingUp (unit lp_victim);
void gf_RemovingUnits (unit lp_victim);
void gf_HideGround (region lp_rEGION, unitgroup lp_gROUP);
void gf_MutaSpawnerBehavior (unit lp_spawner, unit lp_coolantTower);
bool gf_PlayerCanAttack (int lp_player);
void gf_AddUpgradeLevelforZergPlayerGroup (string lp_upgrade);
//--------------------------------------------------------------------------------------------------
// Trigger Variables
//--------------------------------------------------------------------------------------------------
trigger gt_Initialization;
trigger gt_Init01Technology;
trigger gt_Init02Players;
trigger gt_Init03Units;
trigger gt_Init04Music;
trigger gt_Init05Environment;
trigger gt_Init06Difficulties;
trigger gt_Init07Help;
trigger gt_PlayerIsInCombat;
trigger gt_PlayerIsInCombatIndicatorDiminish;
trigger gt_IntroSequence;
trigger gt_StartGame;
trigger gt_SpawnLeviathan;
trigger gt_LeviathanPing;
trigger gt_LeviathanPatrolAI;
trigger gt_LeviathanDies;
trigger gt_LeviathanSpawnsMutas;
trigger gt_LeviathanMutaCatcher;
trigger gt_LeviathanMutaAI;
trigger gt_RemovetheCoolantTowerPing;
trigger gt_Area01CoolantTowerKilledRedSouthEastQ;
trigger gt_Area02CoolantTowerKilledGreenSouthWestQ;
trigger gt_Area03CoolantTowerKilledPurpleNorthWestQ;
trigger gt_Area04CoolantTowerKilledWhiteCentralQ;
trigger gt_Area01Kaboom;
trigger gt_Area02Kaboom;
trigger gt_Area03Kaboom;
trigger gt_Area04Kaboom;
trigger gt_Area01MoneyPickUps;
trigger gt_Area02MoneyPickUps;
trigger gt_Area03MoneyPickUps;
trigger gt_Area04MoneyPickUps;
trigger gt_CreateBlockersArea01;
trigger gt_CreateBlockersArea02;
trigger gt_CreateBlockersArea03;
trigger gt_CreateBlockersArea04;
trigger gt_StartMutaSpawners;
trigger gt_CatchtheMutaPart1;
trigger gt_CatchtheMutaPart2;
trigger gt_MutaSpawnersN3;
trigger gt_MutaSpawnersN7;
trigger gt_MutaSpawnersN16;
trigger gt_MutaSpawnersN18;
trigger gt_MutaSpawnersN20;
trigger gt_MutaSpawnersH1;
trigger gt_MutaSpawnersH2;
trigger gt_MutaSpawnersI5;
trigger gt_MutaSpawnersI6;
trigger gt_MutaSpawnersN6;
trigger gt_MutaSpawnersN12;
trigger gt_MutaSpawnersN15;
trigger gt_MutaSpawnersN17;
trigger gt_MutaSpawnersI1;
trigger gt_MutaSpawnersI4;
trigger gt_MutaSpawnersN5;
trigger gt_MutaSpawnersN9;
trigger gt_MutaSpawnersN10;
trigger gt_MutaSpawnersN14;
trigger gt_MutaSpawnersN23;
trigger gt_MutaSpawnersI2;
trigger gt_MutaSpawnersI3;
trigger gt_ResourcePickups;
trigger gt_PlatformLinesFirstTowerQ;
trigger gt_PlatformLinesBRAQ;
trigger gt_PlatformLinesBRBQ;
trigger gt_PlatformLinesBLAQ;
trigger gt_PlatformLinesBLBQ;
trigger gt_PlatformLinesTLAQ;
trigger gt_PlatformLinesTLBQ;
trigger gt_PlatformLinesTRAQ;
trigger gt_PlatformLinesTRBQ;
trigger gt_PlatformInfestedLineQ;
trigger gt_ComsatStationQ;
trigger gt_ComsatStationQ2;
trigger gt_ComsatStationQ3;
trigger gt_ShowPingCoolantTowers;
trigger gt_AutoSaves;
trigger gt_PlatformInfoSafetyDelay;
trigger gt_StartAI;
trigger gt_StartUpgradesH;
trigger gt_StartUpgradesI;
trigger gt_CombinedAttackWaves;
trigger gt_CombinedAttackWaves01;
trigger gt_CombinedAttackWaves02;
trigger gt_CombinedAttackWaves03;
trigger gt_CombinedAttackWavesLoop;
trigger gt_AIGiveMinerals;
trigger gt_AIGiveGas;
trigger gt_TipCampaignTipsQ;
trigger gt_TipCoolantTowersQ;
trigger gt_TipEscapingtheExplosionQ;
trigger gt_TipLeviathanQ;
trigger gt_StatUnitsLosttoEnemies;
trigger gt_VictoryDestroySpacePlatformsCompleted;
trigger gt_Victory;
trigger gt_DefeatBaseDead;
trigger gt_Defeat;
trigger gt_VictoryCheat;
trigger gt_DefeatCheat;
trigger gt_ObjectiveDestroyCoolantTowersCreateQ;
trigger gt_ObjectiveDestroyCoolantTowersUpdate;
trigger gt_ObjectiveDestroyCoolantTowersComplete;
trigger gt_ObjectiveDestroyCoolantTowersFailed;
trigger gt_ObjectiveKillLeviathanCreateQ;
trigger gt_ObjectiveKillLeviathanComplete;
trigger gt_ObjectiveKillLeviathanFailed;
trigger gt_BriefingQ;
trigger gt_BriefingScene00;
trigger gt_BriefingScene01;
trigger gt_BriefingScene02;
trigger gt_BriefingScene03;
trigger gt_BriefingScene04;
trigger gt_MidPlatformsQ;
trigger gt_MidPlatformsSetup;
trigger gt_MidPlatformsCinematic;
trigger gt_MidPlatformsCinematicEnd;
trigger gt_MidPlatformsCleanup;
trigger gt_CreepArea01BR;
trigger gt_CreepArea02BL;
trigger gt_CreepArea03TL;
trigger gt_CreepArea04TR;
trigger gt_FinalCinematicPlatformLinesBR;
trigger gt_FinalCinematicPlatformLinesBL;
trigger gt_FinalCinematicPlatformLinesTL;
trigger gt_FinalCinematicPlatformLinesTR;
trigger gt_MidLeviathanQ;
trigger gt_MidLeviathanSetup;
trigger gt_MidLeviathanCinematic;
trigger gt_MidLeviathanCinematicEnd;
trigger gt_MidLeviathanCleanup;
trigger gt_RemoveUnits;
trigger gt_VictoryQ;
trigger gt_VictorySetup;
trigger gt_VictoryCinematic;
trigger gt_VictoryCinematicEnd;
trigger gt_VictoryCleanup;
//--------------------------------------------------------------------------------------------------
// Global Functions
//--------------------------------------------------------------------------------------------------
bool gf_PlayerIsInCombat (int lp_player) {
// Automatic Variable Declarations
// Implementation
if ((gv_inCombatIndicator > 0)) {
return true;
}
else {
return false;
}
}
void gf_BlowingUp (unit lp_victim) {
// Automatic Variable Declarations
// Implementation
if ((UnitGetOwner(lp_victim) == gv_pLAYER_P11_PLATFORM_PIECES)) {
return ;
}
if ((UnitGetOwner(lp_victim) == gv_pLAYER_P01_USER)) {
gv_stat_PlayerUnitsLostToPlatform += 1;
gv_stat_PlayerUnitsLostToPlatform += UnitCargoValue(lp_victim, c_unitCargoUnitCount);
}
if ((PlayerRace(UnitGetOwner(lp_victim)) == "Zerg")) {
UnitBehaviorRemove(lp_victim, "ZergBuildingDies6", 1);
UnitBehaviorRemove(lp_victim, "ZergBuildingDies9", 1);
UnitBehaviorAdd(lp_victim, "ZergGenericDeath", lp_victim, 1);
gv_stat_ZergKilledByPlatform += 1;
gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(lp_victim, c_unitCargoUnitCount));
}
UnitKill(lp_victim);
}
void gf_RemovingUnits (unit lp_victim) {
// Automatic Variable Declarations
// Implementation
if ((UnitGetOwner(lp_victim) == gv_pLAYER_P11_PLATFORM_PIECES)) {
return ;
}
if ((UnitGetOwner(lp_victim) == gv_pLAYER_P01_USER)) {
gv_stat_PlayerUnitsLostToPlatform += 1;
gv_stat_PlayerUnitsLostToPlatform += UnitCargoValue(lp_victim, c_unitCargoUnitCount);
}
if (((UnitGetType(lp_victim) == "MineralCrystal") || (UnitGetType(lp_victim) == "NaturalGas"))) {
return ;
}
if ((PlayerRace(UnitGetOwner(lp_victim)) == "Zerg")) {
UnitBehaviorRemove(lp_victim, "ZergBuildingDies6", 1);
UnitBehaviorRemove(lp_victim, "ZergBuildingDies9", 1);
UnitBehaviorAdd(lp_victim, "ZergGenericDeath", lp_victim, 1);
gv_stat_ZergKilledByPlatform += 1;
gv_stat_ZergKilledByPlatform = (gv_stat_ZergKilledByPlatform + UnitCargoValue(lp_victim, c_unitCargoUnitCount));
}
UnitRemove(lp_victim);
}
void gf_HideGround (region lp_rEGION, unitgroup lp_gROUP) {
// Automatic Variable Declarations
unitgroup autoD59259D7_g;
int autoD59259D7_u;
unit autoD59259D7_var;
// Implementation
autoD59259D7_g = UnitGroupFilterRegion(lp_gROUP, lp_rEGION, 0);
autoD59259D7_u = UnitGroupCount(autoD59259D7_g, c_unitCountAll);
for (;; autoD59259D7_u -= 1) {
autoD59259D7_var = UnitGroupUnitFromEnd(autoD59259D7_g, autoD59259D7_u);
if (autoD59259D7_var == null) { break; }
if ((UnitGetType(autoD59259D7_var) == "SpacePlatformDestructibleSmallBlocker")) {
RegionSetCenter(RegionFromId(18), UnitGetPosition(autoD59259D7_var));
CreepModify(RegionGetCenter(RegionFromId(18)), 2.0, false, false);
UnitKill(autoD59259D7_var);
TerrainShowRegion(RegionFromId(18), false);
}
if ((UnitGetType(autoD59259D7_var) == "SpacePlatformDestructibleMediumBlocker")) {
RegionSetCenter(RegionFromId(19), UnitGetPosition(autoD59259D7_var));
CreepModify(RegionGetCenter(RegionFromId(19)), 3.0, false, false);
UnitKill(autoD59259D7_var);
TerrainShowRegion(RegionFromId(19), false);
}
if ((UnitGetType(autoD59259D7_var) == "SpacePlatformDestructibleLargeBlocker")) {
RegionSetCenter(RegionFromId(17), UnitGetPosition(autoD59259D7_var));
CreepModify(RegionGetCenter(RegionFromId(17)), 4.0, false, false);
UnitKill(autoD59259D7_var);
TerrainShowRegion(RegionFromId(17), false);
}
if ((UnitGetType(autoD59259D7_var) == "SpacePlatformDestructibleJumboBlocker")) {
RegionSetCenter(RegionFromId(20), UnitGetPosition(autoD59259D7_var));
CreepModify(RegionGetCenter(RegionFromId(20)), 8.0, false, false);
UnitKill(autoD59259D7_var);
TerrainShowRegion(RegionFromId(20), false);
}
}
}
void gf_MutaSpawnerBehavior (unit lp_spawner, unit lp_coolantTower) {
// Variable Declarations
unitgroup lv_nearbyEnemies;
timer lv_cooldownTimer;
unit lv_defender;
int lv_cycle;
fixed lv_mutaRadius;
fixed lv_mutaSpawnPeriod;
int lv_mutaSpewSize;
// Automatic Variable Declarations
unitgroup auto245CDEAB_g;
int auto245CDEAB_u;
unit auto245CDEAB_var;
int auto628E72CC_n;
int auto628E72CC_i;
unitgroup auto98F04F6A_g;
int auto98F04F6A_u;
// Variable Initialization
lv_nearbyEnemies = UnitGroupEmpty();
lv_cooldownTimer = TimerCreate();
// Implementation
while (true) {
if (((gv_gameOver == true) || (UnitIsAlive(lp_spawner) == false))) {
return ;
}
if ((UnitIsAlive(lp_coolantTower) == true)) {
lv_mutaSpawnPeriod = gv_cMutaSpawnPeriodSlow;
lv_mutaRadius = gv_cMutaRadiusCheckSlow;
lv_mutaSpewSize = gv_cMutaSpewSizeSlow;
}
else {
lv_mutaSpawnPeriod = gv_cMutaSpawnPeriodFast;
lv_mutaRadius = gv_cMutaRadiusCheckFast;
lv_mutaSpewSize = gv_cMutaSpewSizeFast;
if ((TimerGetRemaining(lv_cooldownTimer) > 0.0)) {
TimerStart(lv_cooldownTimer, MinF(TimerGetRemaining(lv_cooldownTimer), lv_mutaSpawnPeriod), false, c_timeAI);
}
}
lv_nearbyEnemies = UnitGroup(null, gv_pLAYER_P01_USER, RegionCircle(UnitGetPosition(lp_spawner), lv_mutaRadius), UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto245CDEAB_g = lv_nearbyEnemies;
auto245CDEAB_u = UnitGroupCount(auto245CDEAB_g, c_unitCountAll);
for (;; auto245CDEAB_u -= 1) {
auto245CDEAB_var = UnitGroupUnitFromEnd(auto245CDEAB_g, auto245CDEAB_u);
if (auto245CDEAB_var == null) { break; }
if ((libNtve_gf_UnitIsVisibleToPlayer(auto245CDEAB_var, gv_pLAYER_P07_ZERG_EXP) == false)) {
UnitGroupRemove(lv_nearbyEnemies, auto245CDEAB_var);
}
}
if ((gv_inCinematic == false) && (TimerGetRemaining(lv_cooldownTimer) <= 0.0) && (UnitGroupCount(gv_mutaDefenders[FixedToInt(UnitGetCustomValue(lp_spawner, 0))], c_unitCountAlive) < gv_mutaSpawnMax) && (UnitGroupCount(lv_nearbyEnemies, c_unitCountAlive) > 0)) {
gv_firstMutaSpawner = lp_spawner;
TriggerExecute(gt_PlatformInfestedLineQ, true, false);
UIAlertPoint("Trigger", gv_pLAYER_P01_USER, StringExternal("Param/Value/07DB1EB1"), null, UnitGetPosition(gv_firstMutaSpawner));
TimerStart(lv_cooldownTimer, lv_mutaSpawnPeriod, false, c_timeAI);
auto628E72CC_n = lv_mutaSpewSize;
for (auto628E72CC_i = 1; auto628E72CC_i <= auto628E72CC_n; auto628E72CC_i += 1) {
UnitIssueOrder(lp_spawner, Order(AbilityCommand("InfestedVentSpawnMutalisk", 0)), c_orderQueueReplace);
}
}
auto98F04F6A_g = gv_mutaDefenders[FixedToInt(UnitGetCustomValue(lp_spawner, 0))];
auto98F04F6A_u = UnitGroupCount(auto98F04F6A_g, c_unitCountAll);
for (;; auto98F04F6A_u -= 1) {
lv_defender = UnitGroupUnitFromEnd(auto98F04F6A_g, auto98F04F6A_u);
if (lv_defender == null) { break; }
if ((DistanceBetweenPoints(UnitGetPosition(lv_defender), UnitGetPosition(lp_spawner)) > (lv_mutaRadius + 2.0)) && (UnitGetOwner(lv_defender) == gv_pLAYER_P08_MUTALISK_TOWERS)) {
UnitIssueOrder(lv_defender, OrderTargetingPoint(AbilityCommand("move", 0), UnitGetPosition(lp_spawner)), c_orderQueueReplace);
}
else {
if ((OrderGetAbilityCommand(UnitOrder(lv_defender, 0)) != AbilityCommand("attack", 0)) && (OrderGetAbilityCommand(UnitOrder(lv_defender, 0)) != AbilityCommand("move", 3)) && (OrderGetAbilityCommand(UnitOrder(lv_defender, 0)) != AbilityCommand("move", 0)) && (UnitGroupCount(lv_nearbyEnemies, c_unitCountAlive) > 0) && (UnitGetOwner(lv_defender) == gv_pLAYER_P08_MUTALISK_TOWERS)) {
UnitIssueOrder(lv_defender, OrderTargetingPoint(AbilityCommand("attack", 0), UnitGetPosition(UnitGroupRandomUnit(lv_nearbyEnemies, c_unitCountAlive))), c_orderQueueReplace);
}
}
}
Wait(1.0, c_timeAI);
}
}
bool gf_PlayerCanAttack (int lp_player) {
// Automatic Variable Declarations
// Implementation
if ((lp_player == 0)) {
return false;
}
if ((TechTreeUnitCount(lp_player, "Hatchery", c_techCountCompleteOnly) == 0) && (TechTreeUnitCount(lp_player, "Lair", c_techCountCompleteOnly) == 0) && (TechTreeUnitCount(lp_player, "Hive", c_techCountCompleteOnly) == 0)) {
return false;
}
if ((TechTreeUnitCount(lp_player, "RoachWarren", c_techCountCompleteOnly) == 0) && (TechTreeUnitCount(lp_player, "UltraliskCavern", c_techCountCompleteOnly) == 0) && (lp_player == gv_pLAYER_P05_ZERG_TL)) {
return false;
}
if ((TechTreeUnitCount(lp_player, "Spire", c_techCountCompleteOnly) == 0) && (TechTreeUnitCount(lp_player, "GreaterSpire", c_techCountCompleteOnly) == 0) && ((lp_player == gv_pLAYER_P03_ZERG_BR) || (lp_player == gv_pLAYER_P04_ZERG_BL) || (lp_player == gv_pLAYER_P06_ZERG_TR))) {
return false;
}
return true;
}
void gf_AddUpgradeLevelforZergPlayerGroup (string lp_upgrade) {
// Automatic Variable Declarations
playergroup auto4DB85A5D_g;
int auto4DB85A5D_var;
// Implementation
auto4DB85A5D_g = gv_zergPlayers;
auto4DB85A5D_var = -1;
while (true) {
auto4DB85A5D_var = PlayerGroupNextPlayer(auto4DB85A5D_g, auto4DB85A5D_var);
if (auto4DB85A5D_var < 0) { break; }
TechTreeUpgradeAddLevel(auto4DB85A5D_var, 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_MapTValerian02B);
TriggerExecute(gt_Init01Technology, true, true);
TriggerExecute(gt_Init02Players, true, true);
TriggerExecute(gt_Init03Units, true, true);
TriggerExecute(gt_Init04Music, true, true);
TriggerExecute(gt_Init05Environment, true, true);
TriggerExecute(gt_Init06Difficulties, 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());
TechTreeUpgradeAllow(gv_pLAYER_P09_HORNER, "OrbitalRelay", true);
TechTreeUpgradeAddLevel(gv_pLAYER_P09_HORNER, "OrbitalRelay", 1);
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
// Actions
if (!runActions) {
return true;
}
libNtve_gf_SetAlliance(gv_pLAYER_P01_USER, gv_pLAYER_P02_COOLANT_TOWERS, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAlliance(gv_pLAYER_P01_USER, gv_pLAYER_P03_ZERG_BR, libNtve_ge_AllianceSetting_Enemy);
libNtve_gf_SetAlliance(gv_pLAYER_P01_USER, gv_pLAYER_P04_ZERG_BL, libNtve_ge_AllianceSetting_Enemy);
libNtve_gf_SetAlliance(gv_pLAYER_P01_USER, gv_pLAYER_P05_ZERG_TL, libNtve_ge_AllianceSetting_Enemy);
libNtve_gf_SetAlliance(gv_pLAYER_P01_USER, gv_pLAYER_P06_ZERG_TR, libNtve_ge_AllianceSetting_Enemy);
libNtve_gf_SetAlliance(gv_pLAYER_P01_USER, gv_pLAYER_P07_ZERG_EXP, libNtve_ge_AllianceSetting_Enemy);
libNtve_gf_SetAlliance(gv_pLAYER_P01_USER, gv_pLAYER_P08_MUTALISK_TOWERS, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAlliance(gv_pLAYER_P01_USER, gv_pLAYER_P09_HORNER, libNtve_ge_AllianceSetting_AllyWithSharedVision);
libNtve_gf_SetAlliance(gv_pLAYER_P01_USER, gv_pLAYER_P10_LEVIATHAN, libNtve_ge_AllianceSetting_Enemy);
libNtve_gf_SetAlliance(gv_pLAYER_P01_USER, gv_pLAYER_P11_PLATFORM_PIECES, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAlliance(gv_pLAYER_P02_COOLANT_TOWERS, gv_pLAYER_P03_ZERG_BR, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P02_COOLANT_TOWERS, gv_pLAYER_P04_ZERG_BL, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P02_COOLANT_TOWERS, gv_pLAYER_P05_ZERG_TL, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P02_COOLANT_TOWERS, gv_pLAYER_P06_ZERG_TR, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P02_COOLANT_TOWERS, gv_pLAYER_P07_ZERG_EXP, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P02_COOLANT_TOWERS, gv_pLAYER_P08_MUTALISK_TOWERS, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P02_COOLANT_TOWERS, gv_pLAYER_P09_HORNER, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAlliance(gv_pLAYER_P02_COOLANT_TOWERS, gv_pLAYER_P10_LEVIATHAN, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P03_ZERG_BR, gv_pLAYER_P04_ZERG_BL, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P03_ZERG_BR, gv_pLAYER_P05_ZERG_TL, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P03_ZERG_BR, gv_pLAYER_P06_ZERG_TR, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P03_ZERG_BR, gv_pLAYER_P07_ZERG_EXP, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P03_ZERG_BR, gv_pLAYER_P08_MUTALISK_TOWERS, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P03_ZERG_BR, gv_pLAYER_P09_HORNER, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAlliance(gv_pLAYER_P03_ZERG_BR, gv_pLAYER_P10_LEVIATHAN, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P04_ZERG_BL, gv_pLAYER_P05_ZERG_TL, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P04_ZERG_BL, gv_pLAYER_P06_ZERG_TR, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P04_ZERG_BL, gv_pLAYER_P07_ZERG_EXP, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P04_ZERG_BL, gv_pLAYER_P08_MUTALISK_TOWERS, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P04_ZERG_BL, gv_pLAYER_P10_LEVIATHAN, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P05_ZERG_TL, gv_pLAYER_P06_ZERG_TR, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P05_ZERG_TL, gv_pLAYER_P07_ZERG_EXP, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P05_ZERG_TL, gv_pLAYER_P08_MUTALISK_TOWERS, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P05_ZERG_TL, gv_pLAYER_P09_HORNER, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAlliance(gv_pLAYER_P05_ZERG_TL, gv_pLAYER_P10_LEVIATHAN, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P06_ZERG_TR, gv_pLAYER_P07_ZERG_EXP, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P06_ZERG_TR, gv_pLAYER_P08_MUTALISK_TOWERS, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P06_ZERG_TR, gv_pLAYER_P09_HORNER, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAlliance(gv_pLAYER_P06_ZERG_TR, gv_pLAYER_P10_LEVIATHAN, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P07_ZERG_EXP, gv_pLAYER_P08_MUTALISK_TOWERS, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P07_ZERG_EXP, gv_pLAYER_P09_HORNER, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAlliance(gv_pLAYER_P07_ZERG_EXP, gv_pLAYER_P10_LEVIATHAN, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
libNtve_gf_SetAlliance(gv_pLAYER_P08_MUTALISK_TOWERS, gv_pLAYER_P10_LEVIATHAN, libNtve_ge_AllianceSetting_AllyWithSharedVisionAndPushable);
PlayerModifyPropertyInt(gv_pLAYER_P01_USER, c_playerPropMinerals, c_playerPropOperSetTo, 350);
PlayerModifyPropertyInt(gv_pLAYER_P01_USER, c_playerPropVespene, c_playerPropOperSetTo, 250);
PlayerModifyPropertyInt(gv_pLAYER_P03_ZERG_BR, c_playerPropMinerals, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_pLAYER_P03_ZERG_BR, c_playerPropVespene, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_pLAYER_P04_ZERG_BL, c_playerPropMinerals, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_pLAYER_P04_ZERG_BL, c_playerPropVespene, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_pLAYER_P05_ZERG_TL, c_playerPropMinerals, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_pLAYER_P05_ZERG_TL, c_playerPropVespene, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_pLAYER_P06_ZERG_TR, c_playerPropMinerals, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_pLAYER_P06_ZERG_TR, c_playerPropVespene, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_pLAYER_P07_ZERG_EXP, c_playerPropMinerals, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_pLAYER_P08_MUTALISK_TOWERS, c_playerPropVespene, c_playerPropOperSetTo, 5000);
PlayerSetColorIndex(gv_pLAYER_P03_ZERG_BR, 4, true);
PlayerSetColorIndex(gv_pLAYER_P04_ZERG_BL, 4, true);
PlayerSetColorIndex(gv_pLAYER_P05_ZERG_TL, 4, true);
PlayerSetColorIndex(gv_pLAYER_P06_ZERG_TR, 4, true);
PlayerSetColorIndex(gv_pLAYER_P07_ZERG_EXP, 4, true);
PlayerSetColorIndex(gv_pLAYER_P08_MUTALISK_TOWERS, 4, true);
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_P03_ZERG_BR);
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_P04_ZERG_BL);
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_P05_ZERG_TL);
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_P06_ZERG_TR);
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_P07_ZERG_EXP);
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_P08_MUTALISK_TOWERS);
PlayerGroupAdd(gv_zergPlayers, gv_pLAYER_P10_LEVIATHAN);
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Init02Players_Init () {
gt_Init02Players = TriggerCreate("gt_Init02Players_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Init 03 Units
//--------------------------------------------------------------------------------------------------
bool gt_Init03Units_Func (bool testConds, bool runActions) {
// Variable Declarations
bool lv_playerHasMercTech;
int lv_merc;
int lv_i;
// Automatic Variable Declarations
unitgroup auto10F0BB12_g;
int auto10F0BB12_u;
unit auto10F0BB12_var;
unitgroup auto54F61631_g;
int auto54F61631_u;
unit auto54F61631_var;
unitgroup auto6F0DFD17_g;
int auto6F0DFD17_u;
unit auto6F0DFD17_var;
unitgroup auto1E1E1136_g;
int auto1E1E1136_u;
unit auto1E1E1136_var;
unitgroup auto88A19CEF_g;
int auto88A19CEF_u;
unit auto88A19CEF_var;
unitgroup auto460A7C27_g;
int auto460A7C27_u;
unit auto460A7C27_var;
unitgroup auto10416F19_g;
int auto10416F19_u;
unit auto10416F19_var;
// Variable Initialization
lv_merc = libCamp_ge_StoryMercID_MercNone;
// Actions
if (!runActions) {
return true;
}
auto10F0BB12_g = UnitGroup("PlatformConnector", gv_pLAYER_P02_COOLANT_TOWERS, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto10F0BB12_u = UnitGroupCount(auto10F0BB12_g, c_unitCountAll);
for (;; auto10F0BB12_u -= 1) {
auto10F0BB12_var = UnitGroupUnitFromEnd(auto10F0BB12_g, auto10F0BB12_u);
if (auto10F0BB12_var == null) { break; }
UnitSetInfoText(auto10F0BB12_var, StringExternal("Param/Value/C75FDDE3"), StringExternal("Param/Value/9B53B6F0"), StringToText(""));
}
UnitSetPropertyFixed(UnitFromId(1), c_unitPropEnergy, 50.0);
UnitSetPropertyFixed(UnitFromId(1089), c_unitPropEnergyPercent, 100.0);
UnitSetPropertyFixed(UnitFromId(1088), c_unitPropEnergyPercent, 100.0);
UnitSetPropertyFixed(UnitFromId(262), c_unitPropEnergyPercent, 100.0);
UnitSetPropertyFixed(UnitFromId(75), c_unitPropEnergyPercent, 100.0);
UnitSetPropertyFixed(UnitFromId(264), c_unitPropEnergyPercent, 100.0);
UnitSetPropertyFixed(UnitFromId(511), c_unitPropEnergyPercent, 100.0);
auto54F61631_g = UnitGroup("SpacePlatformVentsUnit", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto54F61631_u = UnitGroupCount(auto54F61631_g, c_unitCountAll);
for (;; auto54F61631_u -= 1) {
auto54F61631_var = UnitGroupUnitFromEnd(auto54F61631_g, auto54F61631_u);
if (auto54F61631_var == null) { break; }
UnitSetCustomValue(auto54F61631_var, 0, IntToFixed(lv_i));
lv_i += 1;
}
auto6F0DFD17_g = UnitGroup("SpacePlatformVentsUnit", gv_pLAYER_P08_MUTALISK_TOWERS, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
auto6F0DFD17_u = UnitGroupCount(auto6F0DFD17_g, c_unitCountAll);
for (;; auto6F0DFD17_u -= 1) {
auto6F0DFD17_var = UnitGroupUnitFromEnd(auto6F0DFD17_g, auto6F0DFD17_u);
if (auto6F0DFD17_var == null) { break; }
UnitSetState(auto6F0DFD17_var, c_unitStateTargetable, false);
UnitSetState(auto6F0DFD17_var, c_unitStateStatusBar, false);
UnitSetState(auto6F0DFD17_var, c_unitStateInvulnerable, true);
UnitSetInfoText(auto6F0DFD17_var, StringExternal("Param/Value/EBA46453"), StringExternal("Param/Value/45CC2087"), StringToText(""));
}
auto1E1E1136_g = UnitGroup(null, gv_pLAYER_P11_PLATFORM_PIECES, RegionFromId(1), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
auto1E1E1136_u = UnitGroupCount(auto1E1E1136_g, c_unitCountAll);
for (;; auto1E1E1136_u -= 1) {
auto1E1E1136_var = UnitGroupUnitFromEnd(auto1E1E1136_g, auto1E1E1136_u);
if (auto1E1E1136_var == null) { break; }
gv_numberOfUnitsArea01 += 1;
gv_unitsArea01[gv_numberOfUnitsArea01].lv_unitType = UnitGetType(auto1E1E1136_var);
gv_unitsArea01[gv_numberOfUnitsArea01].lv_player = UnitGetOwner(auto1E1E1136_var);
gv_unitsArea01[gv_numberOfUnitsArea01].lv_position = UnitGetPosition(auto1E1E1136_var);
gv_unitsArea01[gv_numberOfUnitsArea01].lv_facing = UnitGetFacing(auto1E1E1136_var);
UnitRemove(auto1E1E1136_var);
}
auto88A19CEF_g = UnitGroup(null, gv_pLAYER_P11_PLATFORM_PIECES, RegionFromId(2), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
auto88A19CEF_u = UnitGroupCount(auto88A19CEF_g, c_unitCountAll);
for (;; auto88A19CEF_u -= 1) {
auto88A19CEF_var = UnitGroupUnitFromEnd(auto88A19CEF_g, auto88A19CEF_u);
if (auto88A19CEF_var == null) { break; }
gv_numberOfUnitsArea02 += 1;
gv_unitsArea02[gv_numberOfUnitsArea02].lv_unitType = UnitGetType(auto88A19CEF_var);
gv_unitsArea02[gv_numberOfUnitsArea02].lv_player = UnitGetOwner(auto88A19CEF_var);
gv_unitsArea02[gv_numberOfUnitsArea02].lv_position = UnitGetPosition(auto88A19CEF_var);
gv_unitsArea02[gv_numberOfUnitsArea02].lv_facing = UnitGetFacing(auto88A19CEF_var);
UnitRemove(auto88A19CEF_var);
}
auto460A7C27_g = UnitGroup(null, gv_pLAYER_P11_PLATFORM_PIECES, RegionFromId(3), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
auto460A7C27_u = UnitGroupCount(auto460A7C27_g, c_unitCountAll);
for (;; auto460A7C27_u -= 1) {
auto460A7C27_var = UnitGroupUnitFromEnd(auto460A7C27_g, auto460A7C27_u);
if (auto460A7C27_var == null) { break; }
gv_numberOfUnitsArea03 += 1;
gv_unitsArea03[gv_numberOfUnitsArea03].lv_unitType = UnitGetType(auto460A7C27_var);
gv_unitsArea03[gv_numberOfUnitsArea03].lv_player = UnitGetOwner(auto460A7C27_var);
gv_unitsArea03[gv_numberOfUnitsArea03].lv_position = UnitGetPosition(auto460A7C27_var);
gv_unitsArea03[gv_numberOfUnitsArea03].lv_facing = UnitGetFacing(auto460A7C27_var);
UnitRemove(auto460A7C27_var);
}
auto10416F19_g = UnitGroup(null, gv_pLAYER_P11_PLATFORM_PIECES, RegionFromId(4), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
auto10416F19_u = UnitGroupCount(auto10416F19_g, c_unitCountAll);
for (;; auto10416F19_u -= 1) {
auto10416F19_var = UnitGroupUnitFromEnd(auto10416F19_g, auto10416F19_u);
if (auto10416F19_var == null) { break; }
gv_numberOfUnitsArea04 += 1;
gv_unitsArea04[gv_numberOfUnitsArea04].lv_unitType = UnitGetType(auto10416F19_var);
gv_unitsArea04[gv_numberOfUnitsArea04].lv_player = UnitGetOwner(auto10416F19_var);
gv_unitsArea04[gv_numberOfUnitsArea04].lv_position = UnitGetPosition(auto10416F19_var);
gv_unitsArea04[gv_numberOfUnitsArea04].lv_facing = UnitGetFacing(auto10416F19_var);
UnitRemove(auto10416F19_var);
}
CreepModify(PointFromId(1767), 10.0, true, true);
CreepModify(PointFromId(1870), 10.0, true, true);
CreepModify(PointFromId(1889), 10.0, true, true);
CreepModify(PointFromId(1890), 10.0, true, true);
CreepModify(PointFromId(1891), 10.0, true, true);
CreepModify(PointFromId(1892), 10.0, true, true);
CreepModify(PointFromId(1893), 10.0, true, true);
CreepModify(PointFromId(1902), 10.0, true, true);
CreepModify(PointFromId(1906), 10.0, true, true);
CreepModify(PointFromId(1907), 10.0, true, true);
CreepModify(PointFromId(1908), 10.0, true, true);
CreepModify(PointFromId(1909), 10.0, true, true);
CreepModify(PointFromId(1871), 10.0, true, true);
CreepModify(PointFromId(1910), 10.0, true, true);
CreepModify(PointFromId(1916), 10.0, true, true);
CreepModify(PointFromId(1926), 10.0, true, true);
CreepModify(PointFromId(1927), 10.0, true, true);
CreepModify(PointFromId(1928), 10.0, true, true);
CreepModify(PointFromId(1929), 10.0, true, true);
CreepModify(PointFromId(1930), 10.0, true, true);
CreepModify(PointFromId(1931), 10.0, true, true);
CreepModify(PointFromId(1932), 10.0, true, true);
CreepModify(PointFromId(1933), 10.0, true, true);
CreepModify(PointFromId(1872), 10.0, true, true);
CreepModify(PointFromId(1934), 10.0, true, true);
CreepModify(PointFromId(1935), 10.0, true, true);
CreepModify(PointFromId(1936), 10.0, true, true);
CreepModify(PointFromId(1937), 10.0, true, true);
CreepModify(PointFromId(1938), 10.0, true, true);
CreepModify(PointFromId(1939), 10.0, true, true);
CreepModify(PointFromId(1940), 10.0, true, true);
CreepModify(PointFromId(1941), 10.0, true, true);
CreepModify(PointFromId(1942), 10.0, true, true);
CreepModify(PointFromId(1943), 10.0, true, true);
CreepModify(PointFromId(1873), 10.0, true, true);
CreepModify(PointFromId(1874), 10.0, true, true);
CreepModify(PointFromId(1877), 10.0, true, true);
CreepModify(PointFromId(1878), 10.0, true, true);
CreepModify(PointFromId(1887), 10.0, true, true);
CreepModify(PointFromId(1888), 10.0, true, true);
CreepModify(PointFromId(1944), 10.0, true, true);
CreepModify(PointFromId(1945), 10.0, true, true);
CreepModify(PointFromId(1946), 10.0, true, true);
CreepModify(PointFromId(1947), 10.0, true, true);
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Init03Units_Init () {
gt_Init03Units = TriggerCreate("gt_Init03Units_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, "TValerian02BMusicMain", 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");
CinematicFade(false, 0.0, c_fadeStyleNormal, ColorWithAlpha(0.00, 0.00, 0.00, 0.00), 0.0, false);
VisRevealerCreate(gv_pLAYER_P01_USER, RegionFromId(22));
gv_startingMapRevealer = VisRevealerLastCreated();
CreepSetSpeed(c_creepSpeedDecay, 500.0);
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Init05Environment_Init () {
gt_Init05Environment = TriggerCreate("gt_Init05Environment_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Init 06 Difficulties
//--------------------------------------------------------------------------------------------------
bool gt_Init06Difficulties_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
unitgroup auto9C4C39D5_g;
int auto9C4C39D5_u;
unit auto9C4C39D5_var;
unitgroup auto7DC03CB3_g;
int auto7DC03CB3_u;
unit auto7DC03CB3_var;
playergroup autoF784DC3D_g;
int autoF784DC3D_var;
// Actions
if (!runActions) {
return true;
}
if ((PlayerDifficulty(gv_pLAYER_P01_USER) == 1)) {
PlayerModifyPropertyInt(gv_pLAYER_P03_ZERG_BR, c_playerPropHandicap, c_playerPropOperSetTo, 50);
PlayerModifyPropertyInt(gv_pLAYER_P04_ZERG_BL, c_playerPropHandicap, c_playerPropOperSetTo, 50);
PlayerModifyPropertyInt(gv_pLAYER_P05_ZERG_TL, c_playerPropHandicap, c_playerPropOperSetTo, 50);
PlayerModifyPropertyInt(gv_pLAYER_P06_ZERG_TR, c_playerPropHandicap, c_playerPropOperSetTo, 50);
PlayerModifyPropertyInt(gv_pLAYER_P07_ZERG_EXP, c_playerPropHandicap, c_playerPropOperSetTo, 50);
PlayerModifyPropertyInt(gv_pLAYER_P08_MUTALISK_TOWERS, c_playerPropHandicap, c_playerPropOperSetTo, 50);
}
auto9C4C39D5_g = UnitGroup("PlatformConnector", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto9C4C39D5_u = UnitGroupCount(auto9C4C39D5_g, c_unitCountAll);
for (;; auto9C4C39D5_u -= 1) {
auto9C4C39D5_var = UnitGroupUnitFromEnd(auto9C4C39D5_g, auto9C4C39D5_u);
if (auto9C4C39D5_var == null) { break; }
UnitSetPropertyFixed(auto9C4C39D5_var, c_unitPropLifeMax, libNtve_gf_DifficultyValueFixed(500.0, 1000.0, 1500.0, 2000.0));
UnitSetPropertyFixed(auto9C4C39D5_var, c_unitPropLifePercent, 100.0);
}
auto7DC03CB3_g = UnitGroup("SpacePlatformVentsUnit", c_playerAny, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto7DC03CB3_u = UnitGroupCount(auto7DC03CB3_g, c_unitCountAll);
for (;; auto7DC03CB3_u -= 1) {
auto7DC03CB3_var = UnitGroupUnitFromEnd(auto7DC03CB3_g, auto7DC03CB3_u);
if (auto7DC03CB3_var == null) { break; }
UnitSetPropertyFixed(auto7DC03CB3_var, c_unitPropLifeMax, libNtve_gf_DifficultyValueFixed(700.0, 700.0, 1250.0, 1500.0));
UnitSetPropertyFixed(auto7DC03CB3_var, c_unitPropLifePercent, 100.0);
}
if ((libNtve_gf_DifficultyValueInt(0, 0, 0, 1) == 1)) {
UnitSetPosition(UnitFromId(90), PointFromId(1869), false);
}
gv_leviathanMaxLife = libNtve_gf_DifficultyValueFixed(1500.0, 2500.0, 3000.0, 4000.0);
gv_leviathanMaxEnergy = libNtve_gf_DifficultyValueFixed(500.0, 500.0, 750.0, 1000.0);
gv_cMutaSpawnPeriodSlow = libNtve_gf_DifficultyValueFixed(60.0, 50.0, 45.0, 40.0);
gv_cMutaSpawnPeriodFast = libNtve_gf_DifficultyValueFixed(15.0, 12.0, 9.0, 8.0);
gv_mutaSpawnMax = libNtve_gf_DifficultyValueInt(3, 4, 4, 6);
gv_cMutaRadiusCheckFast = 24.0;
gv_cMutaRadiusCheckSlow = 12.0;
gv_cMutaSpewSizeSlow = 2;
gv_cMutaSpewSizeFast = 1;
autoF784DC3D_g = gv_zergPlayers;
autoF784DC3D_var = -1;
while (true) {
autoF784DC3D_var = PlayerGroupNextPlayer(autoF784DC3D_g, autoF784DC3D_var);
if (autoF784DC3D_var < 0) { break; }
TechTreeUpgradeAddLevel(autoF784DC3D_var, "ZergMeleeWeaponsLevel1", libNtve_gf_DifficultyValueInt(0, 0, 1, 1));
TechTreeUpgradeAddLevel(autoF784DC3D_var, "ZergMissileWeaponsLevel1", libNtve_gf_DifficultyValueInt(0, 0, 1, 1));
TechTreeUpgradeAddLevel(autoF784DC3D_var, "ZergFlyerWeaponsLevel1", libNtve_gf_DifficultyValueInt(0, 0, 1, 1));
TechTreeUpgradeAddLevel(autoF784DC3D_var, "ZergGroundArmorsLevel1", libNtve_gf_DifficultyValueInt(0, 0, 0, 1));
TechTreeUpgradeAddLevel(autoF784DC3D_var, "ZergFlyerArmorsLevel1", libNtve_gf_DifficultyValueInt(0, 0, 0, 1));
TechTreeUpgradeAddLevel(autoF784DC3D_var, "zerglingmovementspeed", libNtve_gf_DifficultyValueInt(0, 0, 0, 1));
TechTreeUpgradeAddLevel(autoF784DC3D_var, "CentrificalHooks", libNtve_gf_DifficultyValueInt(0, 0, 0, 1));
TechTreeUpgradeAddLevel(autoF784DC3D_var, "hydraliskspeed", libNtve_gf_DifficultyValueInt(0, 0, 0, 1));
}
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Init06Difficulties_Init () {
gt_Init06Difficulties = TriggerCreate("gt_Init06Difficulties_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Init 07 Help
//--------------------------------------------------------------------------------------------------
bool gt_Init07Help_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations