-
Notifications
You must be signed in to change notification settings - Fork 12
/
MapScript.galaxy
3960 lines (3509 loc) · 184 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: Temple of Ascension
//
//==================================================================================================
include "TriggerLibs/NativeLib"
include "TriggerLibs/LibertyLib"
include "TriggerLibs/SwarmLib"
include "TriggerLibs/VoidLib"
include "TriggerLibs/VoidCampaignLib"
include "TriggerLibs/VoidCampaignMissionLib"
include "TriggerLibs/VoidCampaignUILib"
//--------------------------------------------------------------------------------------------------
// Library Initialization
//--------------------------------------------------------------------------------------------------
void InitLibs () {
libNtve_InitLib();
libLbty_InitLib();
libHots_InitLib();
libLotv_InitLib();
libVoiC_InitLib();
libVCMI_InitLib();
libVCUI_InitLib();
}
//--------------------------------------------------------------------------------------------------
// Constants
//--------------------------------------------------------------------------------------------------
const int gv_pLAYER_01_USER = 1;
const int gv_pLAYER_02_TALDARIM = 2;
const int gv_pLAYER_03_MOEBIUS = 3;
const int gv_pLAYER_04_AMON = 4;
const int gv_celestialLocksRequired = 5;
const int gv_lockProgressMIN = 0;
const int gv_lockProgressMAX = 80;
//--------------------------------------------------------------------------------------------------
// Global Structures
//--------------------------------------------------------------------------------------------------
struct gs_RECORD_CelestialLock {
unit lv_celestialLock;
int lv_state;
bool lv_transitionInProgress;
region lv_captureRegion;
region lv_firstCaptureRegion;
region lv_celestialLockRegion;
region lv_defenseRegion;
region lv_revealRegion;
revealer lv_revealer;
region lv_bulliesStage1;
region lv_bulliesStage2;
region lv_bulliesStage3;
int lv_objectivePing;
int lv_recaptureCount;
int lv_staticDefenseStrength;
unit lv_progressBarDummyUnit;
timer lv_bullyMicroCooldown;
};
//--------------------------------------------------------------------------------------------------
// Global Preset Declarations
//--------------------------------------------------------------------------------------------------
const int ge_PRESET_CelestialLockState_Inactive = 0;
const int ge_PRESET_CelestialLockState_PlayerControlled = 1;
const int ge_PRESET_CelestialLockState_EnemyControlled = 2;
//--------------------------------------------------------------------------------------------------
// Global Variables
//--------------------------------------------------------------------------------------------------
string gv_mapMusicTrack;
playergroup gv_playerGroup;
playergroup gv_enemyPlayerGroup;
unitgroup gv_stargateGroup;
bool gv_phoenixOrderIssued;
gs_RECORD_CelestialLock[6] gv_celestialLocks;
int gv_celestialLocksActivated;
unit gv_titanicWarpPrism;
int gv_titanicWarpPrismPing;
region[8] gv_attackTargetList_PARAM;
int gv_attackTargetCount_PARAM;
int[8] gv_attackUnitNumbers_PARAM;
string[8] gv_attackUnitTypes_PARAM;
int gv_attackUnitsCount_PARAM;
wave gv_attackWave_PARAM;
unitgroup gv_attackWaveUnits_PARAM;
wave[8] gv_recentlySentAttackWaves;
int gv_recentlySentAttackWaveCounter;
bool gv_lockWarningIssued;
bool gv_baseWarningIssued;
int gv_phoenixGravitons;
timer gv_titanicWarpPrismAchievementTimer;
int gv_locksRecapturedByEnemy;
int gv_firstLockIndex;
bool gv_firstLockRecaptured;
int gv_objectiveDestroyZergBase;
int gv_objectiveRescueStalkers;
unitgroup gv_cinematicPausedUnits;
unitgroup gv_cinematicHiddenUnits;
unitgroup gv_cinematicTempUnits;
bool gv_cinematicCompleted;
bool gv_introMusicComplete;
int[9] gv_introMinerals;
int[2] gv_introGas;
unit gv_introSpectreSpeaker;
unit gv_introPlayerUnit;
unit gv_victoryBeamOrigin;
sound gv_victorySound;
int gv_victoryLock;
void InitGlobals () {
int init_i;
gv_playerGroup = PlayerGroupEmpty();
gv_enemyPlayerGroup = PlayerGroupEmpty();
gv_stargateGroup = UnitGroupEmpty();
for (init_i = 0; init_i <= 5; init_i += 1) {
gv_celestialLocks[init_i].lv_state = ge_PRESET_CelestialLockState_Inactive;
gv_celestialLocks[init_i].lv_captureRegion = RegionFromId(3);
gv_celestialLocks[init_i].lv_firstCaptureRegion = RegionFromId(40);
gv_celestialLocks[init_i].lv_celestialLockRegion = RegionFromId(16);
gv_celestialLocks[init_i].lv_bulliesStage1 = RegionFromId(1);
gv_celestialLocks[init_i].lv_bulliesStage2 = RegionFromId(2);
gv_celestialLocks[init_i].lv_bulliesStage3 = RegionFromId(41);
gv_celestialLocks[init_i].lv_objectivePing = c_invalidPingId;
gv_celestialLocks[init_i].lv_staticDefenseStrength = 1;
gv_celestialLocks[init_i].lv_bullyMicroCooldown = TimerCreate();
}
gv_titanicWarpPrism = UnitFromId(1030);
gv_titanicWarpPrismPing = c_invalidPingId;
for (init_i = 0; init_i <= 7; init_i += 1) {
gv_attackTargetList_PARAM[init_i] = RegionFromId(28);
}
for (init_i = 0; init_i <= 7; init_i += 1) {
gv_attackUnitNumbers_PARAM[init_i] = 1;
}
for (init_i = 0; init_i <= 7; init_i += 1) {
gv_attackUnitTypes_PARAM[init_i] = "Zealot";
}
gv_attackWaveUnits_PARAM = UnitGroupEmpty();
gv_recentlySentAttackWaveCounter = 1;
gv_titanicWarpPrismAchievementTimer = TimerCreate();
gv_objectiveDestroyZergBase = c_invalidObjectiveId;
gv_objectiveRescueStalkers = c_invalidObjectiveId;
gv_cinematicPausedUnits = UnitGroupEmpty();
gv_cinematicHiddenUnits = UnitGroupEmpty();
gv_cinematicTempUnits = UnitGroupEmpty();
gv_victoryLock = 5;
}
//--------------------------------------------------------------------------------------------------
// Global Function Declarations
//--------------------------------------------------------------------------------------------------
void gf_ActivateDeactivateCelestialLock (bool lp_activateDeactivate, int lp_index);
void gf_SetCelestialLockState (int lp_index, int lp_state);
void gf_ActivateDeactivateStaticDefenseforLock (bool lp_activateDeactivate, int lp_index);
void gf_SendBulliesHome (int lp_index);
bool gf_AttackRegionisValid (region lp_region);
void gf_AddLockAttackTarget (region lp_region);
void gf_AddLockAttackWaveUnits (int lp_count, string lp_unitType);
void gf_SendLockAttackWave (int lp_player, int lp_duration);
void gf_LockBullyUpgrades (int lp_index);
//--------------------------------------------------------------------------------------------------
// Trigger Variables
//--------------------------------------------------------------------------------------------------
trigger gt_Initialization;
trigger gt_Init01Technology;
trigger gt_Init02Players;
trigger gt_Init03Units;
trigger gt_Init04MusicSound;
trigger gt_Init05Environment;
trigger gt_Init06Difficulties;
trigger gt_Init07Help;
trigger gt_StartGameQ;
trigger gt_PhoenixIntroQ;
trigger gt_StargateSelectedCleanup;
trigger gt_StargateDiesCleanup;
trigger gt_PhoenixOrderIssued;
trigger gt_CelestialLockInit;
trigger gt_CelestialLockController;
trigger gt_CelestialLockDeactivatedQ;
trigger gt_CelestialLockCloakWarningQ;
trigger gt_FirstCaptureQ;
trigger gt_Autosave2Locks;
trigger gt_Autosave4Locks;
trigger gt_TitanicWarpPrismQ;
trigger gt_TitanicWarpPrismWaitTrigger;
trigger gt_TitanicWarpPrismProximityTrigger;
trigger gt_TitanicWarpPrismBehaviour;
trigger gt_SetUpTitanicWarpPrismEscorts;
trigger gt_TitanicWarpPrismDies;
trigger gt_TitanicWarpPrismWarpInShields;
trigger gt_StartAI;
trigger gt_AttackWaves;
trigger gt_AIUpgradesNormal;
trigger gt_AIUpgradesHard;
trigger gt_AIGiveResources;
trigger gt_RecentlySentWaves;
trigger gt_LockAttackWarningQ;
trigger gt_BaseAttackWarningFollowthroughQ;
trigger gt_EnemyBaseWarningQ;
trigger gt_DefeatBaseDead;
trigger gt_VictoryCelestialLocksActivated;
trigger gt_VictorySequence;
trigger gt_Victory;
trigger gt_Defeat;
trigger gt_VictoryCheat;
trigger gt_DefeatCheat;
trigger gt_StatsPhoenixUsesGravitonBeam;
trigger gt_AchievementTitanoPrismKilledQuickly;
trigger gt_MasteryDestroyEnemyMainBases;
trigger gt_ObjectiveActivateCelestialLocksCreate;
trigger gt_ObjectiveActivateCelestialLocksComplete;
trigger gt_ObjectiveActivateCelestialLocksUpdate;
trigger gt_ObjectiveDestroyTitanicWarpPrismCreate;
trigger gt_ObjectiveDestroyTitanicWarpPrismComplete;
trigger gt_IntroQ;
trigger gt_IntroSetup;
trigger gt_IntroCinematic;
trigger gt_IntroCinematicEnd;
trigger gt_IntroCleanup;
trigger gt_IntroMusic;
trigger gt_IntroCapture1;
trigger gt_IntroCapture2;
trigger gt_VictoryQ;
trigger gt_VictorySetup;
trigger gt_VictoryCinematic;
trigger gt_VictoryCinematicEnd;
trigger gt_VictoryCleanup;
//--------------------------------------------------------------------------------------------------
// Global Presets
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
// Global Functions
//--------------------------------------------------------------------------------------------------
trigger auto_gf_ActivateDeactivateCelestialLock_Trigger = null;
bool auto_gf_ActivateDeactivateCelestialLock_lp_activateDeactivate;
int auto_gf_ActivateDeactivateCelestialLock_lp_index;
void gf_ActivateDeactivateCelestialLock (bool lp_activateDeactivate, int lp_index) {
auto_gf_ActivateDeactivateCelestialLock_lp_activateDeactivate = lp_activateDeactivate;
auto_gf_ActivateDeactivateCelestialLock_lp_index = lp_index;
if (auto_gf_ActivateDeactivateCelestialLock_Trigger == null) {
auto_gf_ActivateDeactivateCelestialLock_Trigger = TriggerCreate("auto_gf_ActivateDeactivateCelestialLock_TriggerFunc");
}
TriggerExecute(auto_gf_ActivateDeactivateCelestialLock_Trigger, false, false);
}
bool auto_gf_ActivateDeactivateCelestialLock_TriggerFunc (bool testConds, bool runActions) {
bool lp_activateDeactivate = auto_gf_ActivateDeactivateCelestialLock_lp_activateDeactivate;
int lp_index = auto_gf_ActivateDeactivateCelestialLock_lp_index;
// Variable Declarations
bool lv_enemyUnitsPresent;
bool lv_friendlyUnitsPresent;
int lv_progress;
int lv_progressBarLabel;
// Automatic Variable Declarations
// Variable Initialization
lv_progressBarLabel = c_invalidDialogControlId;
// Implementation
if (((libVCMI_gf_GameIsOver() == true) || (gv_celestialLocks[lp_index].lv_transitionInProgress == true))) {
return true;
}
gv_celestialLocks[lp_index].lv_transitionInProgress = true;
if ((lp_activateDeactivate == true)) {
libVCUI_gf_SetUnitProgresBarTitle(gv_celestialLocks[lp_index].lv_progressBarDummyUnit, StringExternal("Param/Value/73DBBB33"));
}
else {
libVCUI_gf_SetUnitProgresBarTitle(gv_celestialLocks[lp_index].lv_progressBarDummyUnit, StringExternal("Param/Value/5799B07F"));
}
libVCUI_gf_SetUnitProgressBarProgress(gv_celestialLocks[lp_index].lv_progressBarDummyUnit, gv_lockProgressMIN);
libVCUI_gf_ShowHideUnitProgressBar(gv_celestialLocks[lp_index].lv_progressBarDummyUnit, true);
lv_progressBarLabel = libNtve_gf_ValueFromDataTableDialogItem(true, libVCUI_gf_PU_UnitProgressBar_Dialog(gv_celestialLocks[lp_index].lv_progressBarDummyUnit, libVCUI_ge_PU_UnitProgressBar_DialogTypes_ProgressBar_Value));
DialogControlSetVisible(lv_progressBarLabel, PlayerGroupAll(), false);
while (true) {
if ((libVCMI_gf_GameIsOver() == true)) {
libVCUI_gf_ShowHideUnitProgressBar(gv_celestialLocks[lp_index].lv_progressBarDummyUnit, false);
gv_celestialLocks[lp_index].lv_transitionInProgress = false;
return true;
}
lv_friendlyUnitsPresent = false;
lv_enemyUnitsPresent = false;
if ((UnitGroupCount(UnitGroup(null, gv_pLAYER_01_USER, gv_celestialLocks[lp_index].lv_captureRegion, UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile) | (1 << c_targetFilterCloaked), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 1), c_unitCountAlive) > 0)) {
lv_friendlyUnitsPresent = true;
}
if (((UnitGroupCount(UnitGroup(null, gv_pLAYER_02_TALDARIM, gv_celestialLocks[lp_index].lv_captureRegion, UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile) | (1 << c_targetFilterCloaked), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 1), c_unitCountAlive) > 0) || (UnitGroupCount(UnitGroup(null, gv_pLAYER_03_MOEBIUS, gv_celestialLocks[lp_index].lv_captureRegion, UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile) | (1 << c_targetFilterCloaked), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 1), c_unitCountAlive) > 0))) {
lv_enemyUnitsPresent = true;
}
if ((((lp_activateDeactivate == true) && (lv_friendlyUnitsPresent == true) && (lv_enemyUnitsPresent == false)) || ((lp_activateDeactivate == false) && (lv_friendlyUnitsPresent == false) && (lv_enemyUnitsPresent == true)))) {
lv_progress += 1;
if ((lv_progress == (gv_lockProgressMAX + 1))) {
if ((lp_activateDeactivate == true)) {
gf_SetCelestialLockState(lp_index, ge_PRESET_CelestialLockState_PlayerControlled);
}
else {
gf_SetCelestialLockState(lp_index, ge_PRESET_CelestialLockState_EnemyControlled);
if ((libVCMI_gf_PlayerInCinematicModeCampaign() == false) && (libVCMI_gf_GameIsOver() == false)) {
gv_locksRecapturedByEnemy += 1;
}
}
gv_celestialLocks[lp_index].lv_transitionInProgress = false;
libVCUI_gf_ShowHideUnitProgressBar(gv_celestialLocks[lp_index].lv_progressBarDummyUnit, false);
return true;
}
else {
libVCUI_gf_SetUnitProgressBarProgress(gv_celestialLocks[lp_index].lv_progressBarDummyUnit, lv_progress);
}
}
else {
if ((((lv_friendlyUnitsPresent == false) && (lv_enemyUnitsPresent == false)) || ((lp_activateDeactivate == false) && (lv_friendlyUnitsPresent == true) && (lv_enemyUnitsPresent == false)) || ((lp_activateDeactivate == true) && (lv_friendlyUnitsPresent == false) && (lv_enemyUnitsPresent == true)))) {
libVCUI_gf_ShowHideUnitProgressBar(gv_celestialLocks[lp_index].lv_progressBarDummyUnit, false);
gv_celestialLocks[lp_index].lv_transitionInProgress = false;
return true;
}
}
Wait(0.0625, c_timeAI);
}
return true;
}
void gf_SetCelestialLockState (int lp_index, int lp_state) {
// Variable Declarations
int lv_i;
int lv_locksActivated_LOCAL;
// Automatic Variable Declarations
int auto662517A2_val;
const int auto33DB1416_ae = 5;
const int auto33DB1416_ai = 1;
// Variable Initialization
// Implementation
auto662517A2_val = lp_state;
if (auto662517A2_val == ge_PRESET_CelestialLockState_Inactive) {
gv_celestialLocks[lp_index].lv_state = ge_PRESET_CelestialLockState_Inactive;
UnitSetInfoSubTip(gv_celestialLocks[lp_index].lv_celestialLock, StringExternal("Param/Value/DB7CBD4A"));
ActorSend(libNtve_gf_MainActorofUnit(gv_celestialLocks[lp_index].lv_celestialLock), "Signal StateNeutral");
PingSetTooltip(gv_celestialLocks[lp_index].lv_objectivePing, StringExternal("Param/Value/7B6CAE96"));
PingSetColor(gv_celestialLocks[lp_index].lv_objectivePing, Color(100.00, 100.00, 100.00));
VisRevealerEnable(gv_celestialLocks[lp_index].lv_revealer, false);
VisRevealArea(gv_pLAYER_01_USER, RegionCircle(UnitGetPosition(gv_celestialLocks[lp_index].lv_celestialLock), 8.0), 10.0, false);
gf_ActivateDeactivateStaticDefenseforLock(false, lp_index);
gf_SendBulliesHome(lp_index);
}
else if (auto662517A2_val == ge_PRESET_CelestialLockState_PlayerControlled) {
if ((gv_firstLockIndex == 0) && (GameGetMissionTime() <= 360.0)) {
gv_firstLockIndex = lp_index;
}
gv_celestialLocks[lp_index].lv_state = ge_PRESET_CelestialLockState_PlayerControlled;
UnitSetInfoSubTip(gv_celestialLocks[lp_index].lv_celestialLock, StringExternal("Param/Value/20B971DA"));
ActorSend(libNtve_gf_MainActorofUnit(gv_celestialLocks[lp_index].lv_celestialLock), "Signal StateGood");
PingSetTooltip(gv_celestialLocks[lp_index].lv_objectivePing, StringExternal("Param/Value/C0BB7C7F"));
PingSetColor(gv_celestialLocks[lp_index].lv_objectivePing, Color(0.00, 100.00, 0.00));
VisRevealerEnable(gv_celestialLocks[lp_index].lv_revealer, true);
gf_ActivateDeactivateStaticDefenseforLock(false, lp_index);
gf_SendBulliesHome(lp_index);
}
else if (auto662517A2_val == ge_PRESET_CelestialLockState_EnemyControlled) {
if ((gv_firstLockIndex == lp_index) && (gv_firstLockRecaptured == false)) {
gv_firstLockRecaptured = true;
}
gv_celestialLocks[lp_index].lv_state = ge_PRESET_CelestialLockState_EnemyControlled;
UnitSetInfoSubTip(gv_celestialLocks[lp_index].lv_celestialLock, StringExternal("Param/Value/BBC4FB39"));
ActorSend(libNtve_gf_MainActorofUnit(gv_celestialLocks[lp_index].lv_celestialLock), "Signal StateBad");
PingSetTooltip(gv_celestialLocks[lp_index].lv_objectivePing, StringExternal("Param/Value/5BE1BE19"));
PingSetColor(gv_celestialLocks[lp_index].lv_objectivePing, Color(100.00, 0.00, 0.00));
VisRevealerEnable(gv_celestialLocks[lp_index].lv_revealer, false);
VisRevealArea(gv_pLAYER_01_USER, RegionCircle(UnitGetPosition(gv_celestialLocks[lp_index].lv_celestialLock), 8.0), 10.0, false);
gf_ActivateDeactivateStaticDefenseforLock(true, lp_index);
TriggerExecute(gt_CelestialLockDeactivatedQ, true, false);
}
else {
}
lv_i = 1;
for ( ; ( (auto33DB1416_ai >= 0 && lv_i <= auto33DB1416_ae) || (auto33DB1416_ai < 0 && lv_i >= auto33DB1416_ae) ) ; lv_i += auto33DB1416_ai ) {
if ((gv_celestialLocks[lv_i].lv_state == ge_PRESET_CelestialLockState_PlayerControlled)) {
lv_locksActivated_LOCAL += 1;
}
}
if ((lv_locksActivated_LOCAL != gv_celestialLocksActivated)) {
gv_celestialLocksActivated = lv_locksActivated_LOCAL;
TriggerExecute(gt_ObjectiveActivateCelestialLocksUpdate, true, false);
}
if ((gv_celestialLocksActivated == gv_celestialLocksRequired)) {
gv_victoryLock = lp_index;
TriggerExecute(gt_VictoryCelestialLocksActivated, true, false);
}
if ((gv_celestialLocksActivated == 2)) {
TriggerExecute(gt_Autosave2Locks, true, false);
}
if ((gv_celestialLocksActivated == 4)) {
TriggerExecute(gt_Autosave4Locks, true, false);
}
}
void gf_ActivateDeactivateStaticDefenseforLock (bool lp_activateDeactivate, int lp_index) {
// Automatic Variable Declarations
playergroup autoA6E7E7AF_g;
int autoA6E7E7AF_var;
// Implementation
autoA6E7E7AF_g = gv_enemyPlayerGroup;
autoA6E7E7AF_var = -1;
while (true) {
autoA6E7E7AF_var = PlayerGroupNextPlayer(autoA6E7E7AF_g, autoA6E7E7AF_var);
if (autoA6E7E7AF_var < 0) { break; }
if ((lp_activateDeactivate == true)) {
gv_celestialLocks[lp_index].lv_recaptureCount += 1;
AIResetBullyRebuildCountsInRegion(autoA6E7E7AF_var, gv_celestialLocks[lp_index].lv_bulliesStage1);
AIToggleBulliesInRegion(autoA6E7E7AF_var, gv_celestialLocks[lp_index].lv_bulliesStage1, true);
gf_LockBullyUpgrades(lp_index);
}
else {
gv_celestialLocks[lp_index].lv_staticDefenseStrength = 1;
AIToggleBulliesInRegion(autoA6E7E7AF_var, gv_celestialLocks[lp_index].lv_bulliesStage1, false);
AIToggleBulliesInRegion(autoA6E7E7AF_var, gv_celestialLocks[lp_index].lv_bulliesStage2, false);
AIToggleBulliesInRegion(autoA6E7E7AF_var, gv_celestialLocks[lp_index].lv_bulliesStage3, false);
}
}
}
void gf_SendBulliesHome (int lp_index) {
// Variable Declarations
unitgroup lv_enemyUnits;
// Automatic Variable Declarations
playergroup autoE673A3A7_g;
int autoE673A3A7_var;
unitgroup auto2439952A_g;
int auto2439952A_u;
unit auto2439952A_var;
// Variable Initialization
lv_enemyUnits = UnitGroupEmpty();
// Implementation
autoE673A3A7_g = gv_enemyPlayerGroup;
autoE673A3A7_var = -1;
while (true) {
autoE673A3A7_var = PlayerGroupNextPlayer(autoE673A3A7_g, autoE673A3A7_var);
if (autoE673A3A7_var < 0) { break; }
UnitGroupAddUnitGroup(lv_enemyUnits, UnitGroup(null, autoE673A3A7_var, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32)) | (1 << (c_targetFilterInvulnerable - 32))), 0));
}
auto2439952A_g = lv_enemyUnits;
auto2439952A_u = UnitGroupCount(auto2439952A_g, c_unitCountAll);
for (;; auto2439952A_u -= 1) {
auto2439952A_var = UnitGroupUnitFromEnd(auto2439952A_g, auto2439952A_u);
if (auto2439952A_var == null) { break; }
if ((AIUnitGetWave(auto2439952A_var) == null) && (RegionContainsPoint(gv_celestialLocks[lp_index].lv_defenseRegion, UnitGetGoalPosition(auto2439952A_var)) == true)) {
AIRemoveUnitFromAnyWavesAndSetHome(auto2439952A_var, PlayerStartLocation(UnitGetOwner(auto2439952A_var)));
UnitIssueOrder(auto2439952A_var, OrderTargetingPoint(null, PlayerStartLocation(UnitGetOwner(auto2439952A_var))), c_orderQueueReplace);
AISetUnitScriptControlled(auto2439952A_var, false);
UnitSetAIOption(auto2439952A_var, c_unitAIOptionUsable, true);
}
}
}
bool gf_AttackRegionisValid (region lp_region) {
// Variable Declarations
int lv_lockIndex;
int lv_i;
// Automatic Variable Declarations
const int auto684561D5_ae = 5;
const int auto684561D5_ai = 1;
// Variable Initialization
// Implementation
lv_i = 1;
for ( ; ( (auto684561D5_ai >= 0 && lv_i <= auto684561D5_ae) || (auto684561D5_ai < 0 && lv_i >= auto684561D5_ae) ) ; lv_i += auto684561D5_ai ) {
if ((lp_region == gv_celestialLocks[lv_i].lv_captureRegion)) {
lv_lockIndex = lv_i;
break;
}
}
if ((lv_lockIndex > 0)) {
if (((gv_celestialLocks[lv_lockIndex].lv_state == ge_PRESET_CelestialLockState_PlayerControlled) || (gv_celestialLocks[lv_lockIndex].lv_state == ge_PRESET_CelestialLockState_Inactive))) {
return true;
}
}
else {
if ((UnitGroupCount(UnitGroup(null, gv_pLAYER_01_USER, lp_region, UnitFilter((1 << c_targetFilterStructure), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 1), c_unitCountAlive) > 0)) {
return true;
}
}
return false;
}
void gf_AddLockAttackTarget (region lp_region) {
// Automatic Variable Declarations
// Implementation
gv_attackTargetCount_PARAM += 1;
if ((gv_attackTargetCount_PARAM > 7)) {
gv_attackTargetCount_PARAM = 7;
return ;
}
else {
gv_attackTargetList_PARAM[gv_attackTargetCount_PARAM] = lp_region;
}
}
void gf_AddLockAttackWaveUnits (int lp_count, string lp_unitType) {
// Automatic Variable Declarations
// Implementation
gv_attackUnitsCount_PARAM += 1;
if ((gv_attackUnitsCount_PARAM > 7)) {
gv_attackUnitsCount_PARAM = 7;
return ;
}
else {
gv_attackUnitNumbers_PARAM[gv_attackUnitsCount_PARAM] = lp_count;
gv_attackUnitTypes_PARAM[gv_attackUnitsCount_PARAM] = lp_unitType;
}
}
trigger auto_gf_SendLockAttackWave_Trigger = null;
int auto_gf_SendLockAttackWave_lp_player;
int auto_gf_SendLockAttackWave_lp_duration;
void gf_SendLockAttackWave (int lp_player, int lp_duration) {
auto_gf_SendLockAttackWave_lp_player = lp_player;
auto_gf_SendLockAttackWave_lp_duration = lp_duration;
if (auto_gf_SendLockAttackWave_Trigger == null) {
auto_gf_SendLockAttackWave_Trigger = TriggerCreate("auto_gf_SendLockAttackWave_TriggerFunc");
}
TriggerExecute(auto_gf_SendLockAttackWave_Trigger, false, false);
}
bool auto_gf_SendLockAttackWave_TriggerFunc (bool testConds, bool runActions) {
int lp_player = auto_gf_SendLockAttackWave_lp_player;
int lp_duration = auto_gf_SendLockAttackWave_lp_duration;
int init_i;
// Variable Declarations
int lv_attackTargetCount;
region[8] lv_attackTargetList;
int lv_attackUnitsCount;
int[8] lv_attackUnitNumbers;
string[8] lv_attackUnitTypes;
int lv_i;
int lv_currentValidTarget;
wave lv_attackWave;
unitgroup lv_attackWaveUnits;
bool lv_lowerRightAttack;
// Automatic Variable Declarations
int auto8121782D_ae;
const int auto8121782D_ai = 1;
int auto07384964_ae;
const int auto07384964_ai = 1;
int auto44C204A1_ae;
const int auto44C204A1_ai = 1;
int autoE705FAEF_ae;
const int autoE705FAEF_ai = 1;
int autoFBE06913_ae;
const int autoFBE06913_ai = 1;
// Variable Initialization
for (init_i = 0; init_i <= 7; init_i += 1) {
lv_attackTargetList[init_i] = RegionFromId(28);
}
lv_attackWaveUnits = UnitGroupEmpty();
// Implementation
lv_attackTargetCount = gv_attackTargetCount_PARAM;
auto8121782D_ae = lv_attackTargetCount;
lv_i = 1;
for ( ; ( (auto8121782D_ai >= 0 && lv_i <= auto8121782D_ae) || (auto8121782D_ai < 0 && lv_i >= auto8121782D_ae) ) ; lv_i += auto8121782D_ai ) {
lv_attackTargetList[lv_i] = gv_attackTargetList_PARAM[lv_i];
}
lv_attackUnitsCount = gv_attackUnitsCount_PARAM;
auto07384964_ae = lv_attackUnitsCount;
lv_i = 1;
for ( ; ( (auto07384964_ai >= 0 && lv_i <= auto07384964_ae) || (auto07384964_ai < 0 && lv_i >= auto07384964_ae) ) ; lv_i += auto07384964_ai ) {
lv_attackUnitNumbers[lv_i] = gv_attackUnitNumbers_PARAM[lv_i];
lv_attackUnitTypes[lv_i] = gv_attackUnitTypes_PARAM[lv_i];
}
gv_attackTargetCount_PARAM = 0;
gv_attackUnitsCount_PARAM = 0;
if ((lv_attackTargetCount == 0)) {
AIAttackWaveSetTargetPlayer(lp_player, PlayerGroupSingle(gv_pLAYER_01_USER));
if ((lp_player == gv_pLAYER_02_TALDARIM)) {
AIAttackWaveSetGatherPoint(lp_player, PointFromId(1002));
AIAttackWaveAddWaypoint(lp_player, PointFromId(344), false);
}
else {
AIAttackWaveSetGatherPoint(lp_player, PointFromId(904));
AIAttackWaveAddWaypoint(lp_player, PointFromId(452), false);
}
}
else {
if (((lv_attackTargetList[1] == gv_celestialLocks[1].lv_captureRegion) || (lv_attackTargetList[1] == gv_celestialLocks[4].lv_captureRegion) || (lv_attackTargetList[1] == gv_celestialLocks[5].lv_captureRegion))) {
if ((lp_player == gv_pLAYER_02_TALDARIM)) {
AIAttackWaveSetTargetRegion(lp_player, RegionCircle(PointFromId(432), 4.0), 0);
AIAttackWaveSetGatherPoint(lp_player, PointFromId(1003));
}
else {
AIAttackWaveSetTargetRegion(lp_player, RegionCircle(PointFromId(907), 4.0), 0);
AIAttackWaveSetGatherPoint(lp_player, PointFromId(905));
}
}
else {
if ((lp_player == gv_pLAYER_02_TALDARIM)) {
AIAttackWaveSetTargetRegion(lp_player, RegionCircle(PointFromId(344), 4.0), 0);
AIAttackWaveSetGatherPoint(lp_player, PointFromId(1002));
}
else {
lv_lowerRightAttack = true;
AIAttackWaveSetTargetRegion(lp_player, RegionCircle(PointFromId(452), 4.0), 0);
AIAttackWaveSetGatherPoint(lp_player, PointFromId(904));
}
}
}
auto44C204A1_ae = lv_attackUnitsCount;
lv_i = 1;
for ( ; ( (auto44C204A1_ai >= 0 && lv_i <= auto44C204A1_ae) || (auto44C204A1_ai < 0 && lv_i >= auto44C204A1_ae) ) ; lv_i += auto44C204A1_ai ) {
if ((lv_attackUnitNumbers[lv_i] > 0)) {
AIAttackWaveAddUnits4(lv_attackUnitNumbers[lv_i], lv_attackUnitNumbers[lv_i], lv_attackUnitNumbers[lv_i], lv_attackUnitNumbers[lv_i], lv_attackUnitTypes[lv_i]);
}
}
AIAttackWaveSend(lp_player, lp_duration, false);
if ((lv_attackTargetCount == 0)) {
return true;
}
lv_attackWave = WaveLastCreated();
Wait((lp_duration - 15.0), c_timeAI);
gv_attackTargetCount_PARAM = lv_attackTargetCount;
autoE705FAEF_ae = lv_attackTargetCount;
lv_i = 1;
for ( ; ( (autoE705FAEF_ai >= 0 && lv_i <= autoE705FAEF_ae) || (autoE705FAEF_ai < 0 && lv_i >= autoE705FAEF_ae) ) ; lv_i += autoE705FAEF_ai ) {
gv_attackTargetList_PARAM[lv_i] = lv_attackTargetList[lv_i];
}
gv_attackWave_PARAM = lv_attackWave;
TriggerExecute(gt_LockAttackWarningQ, true, false);
Wait(15.0, c_timeAI);
lv_attackWaveUnits = AIWaveGetUnits(lv_attackWave);
if (((lv_attackWaveUnits == null) || (lv_attackWaveUnits == UnitGroupEmpty()))) {
return true;
}
while (true) {
if (((libVCMI_gf_GameIsOver() == true) || (libNtve_gf_UnitGroupIsDead(lv_attackWaveUnits) == true))) {
return true;
}
if ((gf_AttackRegionisValid(lv_attackTargetList[lv_currentValidTarget]) == false)) {
if (((lv_attackTargetList[lv_currentValidTarget] == gv_celestialLocks[1].lv_captureRegion) || (lv_attackTargetList[lv_currentValidTarget] == gv_celestialLocks[2].lv_captureRegion) || (lv_attackTargetList[lv_currentValidTarget] == gv_celestialLocks[3].lv_captureRegion) || (lv_attackTargetList[lv_currentValidTarget] == gv_celestialLocks[4].lv_captureRegion) || (lv_attackTargetList[lv_currentValidTarget] == gv_celestialLocks[5].lv_captureRegion))) {
if ((lv_attackTargetList[lv_currentValidTarget] == gv_celestialLocks[1].lv_captureRegion)) {
Wait(70.0, c_timeAI);
}
else {
Wait(55.0, c_timeAI);
}
if (((libVCMI_gf_GameIsOver() == true) || (libNtve_gf_UnitGroupIsDead(lv_attackWaveUnits) == true))) {
return true;
}
}
autoFBE06913_ae = lv_attackTargetCount;
lv_i = (lv_currentValidTarget + 1);
for ( ; ( (autoFBE06913_ai >= 0 && lv_i <= autoFBE06913_ae) || (autoFBE06913_ai < 0 && lv_i >= autoFBE06913_ae) ) ; lv_i += autoFBE06913_ai ) {
if ((gf_AttackRegionisValid(lv_attackTargetList[lv_i]) == true)) {
lv_currentValidTarget = lv_i;
break;
}
}
if ((gf_AttackRegionisValid(lv_attackTargetList[lv_currentValidTarget]) == true)) {
AIRemoveGroupFromAnyWavesAndSetHome(lv_attackWaveUnits, UnitGroupCenterOfGroup(lv_attackWaveUnits));
AIAttackWaveSetTargetRegion(lp_player, lv_attackTargetList[lv_currentValidTarget], 0);
AIAttackWaveSetGatherPoint(lp_player, UnitGroupCenterOfGroup(lv_attackWaveUnits));
if ((lv_lowerRightAttack == true) && ((lv_attackTargetList[lv_currentValidTarget] == RegionFromId(32)) || (lv_attackTargetList[lv_currentValidTarget] == RegionFromId(33)))) {
AIAttackWaveAddWaypoint(lp_player, PointFromId(702), false);
}
if ((lv_lowerRightAttack == true) && (lv_attackTargetList[lv_currentValidTarget] == gv_celestialLocks[2].lv_captureRegion)) {
AIAttackWaveAddWaypoint(lp_player, PointFromId(1705), false);
}
AIAttackWaveUseGroup(lp_player, lv_attackWaveUnits);
AIAttackWaveSend(lp_player, 0, false);
lv_attackWave = WaveLastCreated();
if (((lv_attackTargetList[lv_currentValidTarget] == RegionFromId(32)) || (lv_attackTargetList[lv_currentValidTarget] == RegionFromId(33)))) {
gv_attackTargetList_PARAM[1] = lv_attackTargetList[lv_currentValidTarget];
gv_attackWaveUnits_PARAM = lv_attackWaveUnits;
TriggerExecute(gt_BaseAttackWarningFollowthroughQ, true, false);
}
}
else {
break;
}
}
Wait(1.0, c_timeAI);
}
AIRemoveGroupFromAnyWavesAndSetHome(lv_attackWaveUnits, UnitGroupCenterOfGroup(lv_attackWaveUnits));
AIAttackWaveSetTargetPlayer(lp_player, PlayerGroupSingle(gv_pLAYER_01_USER));
AIAttackWaveSetGatherPoint(lp_player, UnitGroupCenterOfGroup(lv_attackWaveUnits));
AIAttackWaveUseGroup(lp_player, lv_attackWaveUnits);
AIAttackWaveSend(lp_player, 0, false);
return true;
}
trigger auto_gf_LockBullyUpgrades_Trigger = null;
int auto_gf_LockBullyUpgrades_lp_index;
void gf_LockBullyUpgrades (int lp_index) {
auto_gf_LockBullyUpgrades_lp_index = lp_index;
if (auto_gf_LockBullyUpgrades_Trigger == null) {
auto_gf_LockBullyUpgrades_Trigger = TriggerCreate("auto_gf_LockBullyUpgrades_TriggerFunc");
}
TriggerExecute(auto_gf_LockBullyUpgrades_Trigger, false, false);
}
bool auto_gf_LockBullyUpgrades_TriggerFunc (bool testConds, bool runActions) {
int lp_index = auto_gf_LockBullyUpgrades_lp_index;
// Automatic Variable Declarations
playergroup auto52EA6682_g;
int auto52EA6682_var;
playergroup auto3F91E586_g;
int auto3F91E586_var;
// Implementation
if ((gv_celestialLocks[lp_index].lv_recaptureCount == 0)) {
Wait(300.0, c_timeAI);
}
else {
Wait(180.0, c_timeAI);
}
if ((gv_celestialLocks[lp_index].lv_state == ge_PRESET_CelestialLockState_EnemyControlled)) {
gv_celestialLocks[lp_index].lv_staticDefenseStrength = 2;
auto52EA6682_g = gv_enemyPlayerGroup;
auto52EA6682_var = -1;
while (true) {
auto52EA6682_var = PlayerGroupNextPlayer(auto52EA6682_g, auto52EA6682_var);
if (auto52EA6682_var < 0) { break; }
AIResetBullyRebuildCountsInRegion(auto52EA6682_var, gv_celestialLocks[lp_index].lv_bulliesStage2);
AIToggleBulliesInRegion(auto52EA6682_var, gv_celestialLocks[lp_index].lv_bulliesStage2, true);
}
}
else {
return true;
}
if (((gv_celestialLocks[lp_index].lv_recaptureCount == 0) || (GameGetMissionTime() < 600.0))) {
Wait(300.0, c_timeAI);
}
else {
Wait(180.0, c_timeAI);
}
if ((gv_celestialLocks[lp_index].lv_state == ge_PRESET_CelestialLockState_EnemyControlled)) {
gv_celestialLocks[lp_index].lv_staticDefenseStrength = 3;
auto3F91E586_g = gv_enemyPlayerGroup;
auto3F91E586_var = -1;
while (true) {
auto3F91E586_var = PlayerGroupNextPlayer(auto3F91E586_g, auto3F91E586_var);
if (auto3F91E586_var < 0) { break; }
AIResetBullyRebuildCountsInRegion(auto3F91E586_var, gv_celestialLocks[lp_index].lv_bulliesStage3);
AIToggleBulliesInRegion(auto3F91E586_var, gv_celestialLocks[lp_index].lv_bulliesStage3, true);
}
}
else {
return true;
}
return true;
}
//--------------------------------------------------------------------------------------------------
// Trigger: Initialization
//--------------------------------------------------------------------------------------------------
bool gt_Initialization_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
libVoiC_gf_ULoadCampaignData("PUlnar01");
TriggerExecute(gt_Init01Technology, true, false);
libVoiC_gf_PurchaseStorymodeTech();
TriggerExecute(gt_Init02Players, true, false);
TriggerExecute(gt_Init03Units, true, false);
TriggerExecute(gt_Init04MusicSound, true, false);
TriggerExecute(gt_Init05Environment, true, false);
TriggerExecute(gt_Init06Difficulties, true, false);
TriggerExecute(gt_Init07Help, true, false);
TriggerExecute(gt_IntroQ, true, true);
TriggerExecute(gt_StartGameQ, 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;
}
libVoiC_gf_SetTechRestrictionsCallback(TriggerGetCurrent());
libVoiC_gf_EnableCampaignTechUnit(true, "Phoenix", gv_pLAYER_01_USER);
libNtve_gf_SetUpgradeLevelForPlayer(gv_pLAYER_02_TALDARIM, "DarkProtoss", 1);
libNtve_gf_SetUpgradeLevelForPlayer(gv_pLAYER_03_MOEBIUS, "DarkProtoss", 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;
}
PlayerGroupAdd(gv_playerGroup, gv_pLAYER_01_USER);
PlayerGroupAdd(gv_enemyPlayerGroup, gv_pLAYER_02_TALDARIM);
PlayerGroupAdd(gv_enemyPlayerGroup, gv_pLAYER_03_MOEBIUS);
libNtve_gf_SetAlliance(gv_pLAYER_01_USER, gv_pLAYER_02_TALDARIM, libNtve_ge_AllianceSetting_Enemy);
libNtve_gf_SetAlliance(gv_pLAYER_01_USER, gv_pLAYER_03_MOEBIUS, libNtve_ge_AllianceSetting_Enemy);
libNtve_gf_SetAlliance(gv_pLAYER_02_TALDARIM, gv_pLAYER_03_MOEBIUS, libNtve_ge_AllianceSetting_AllyWithSharedVision);
libNtve_gf_SetAlliance(gv_pLAYER_02_TALDARIM, gv_pLAYER_04_AMON, libNtve_ge_AllianceSetting_Neutral);
libNtve_gf_SetAlliance(gv_pLAYER_03_MOEBIUS, gv_pLAYER_04_AMON, libNtve_ge_AllianceSetting_Neutral);
PlayerModifyPropertyInt(gv_pLAYER_01_USER, c_playerPropMinerals, c_playerPropOperSetTo, 200);
PlayerModifyPropertyInt(gv_pLAYER_01_USER, c_playerPropVespene, c_playerPropOperSetTo, 150);
PlayerModifyPropertyInt(gv_pLAYER_02_TALDARIM, c_playerPropMinerals, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_pLAYER_02_TALDARIM, c_playerPropVespene, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_pLAYER_03_MOEBIUS, c_playerPropMinerals, c_playerPropOperSetTo, 5000);
PlayerModifyPropertyInt(gv_pLAYER_03_MOEBIUS, c_playerPropVespene, c_playerPropOperSetTo, 5000);
PlayerSetState(gv_pLAYER_02_TALDARIM, c_playerStateFoodIgnored, true);
PlayerSetState(gv_pLAYER_03_MOEBIUS, c_playerStateFoodIgnored, true);
libNtve_gf_SetUpgradeLevelForPlayer(gv_pLAYER_01_USER, "HeroicShieldCleanUp", 1);
libNtve_gf_SetUpgradeLevelForPlayer(gv_pLAYER_02_TALDARIM, "HeroicShieldCleanUp", 1);
libNtve_gf_SetUpgradeLevelForPlayer(gv_pLAYER_03_MOEBIUS, "HeroicShieldCleanUp", 1);
libNtve_gf_SetUpgradeLevelForPlayer(gv_pLAYER_04_AMON, "HeroicShieldCleanUp", 1);
PlayerSetColorIndex(gv_pLAYER_02_TALDARIM, 1, true);
PlayerSetColorIndex(gv_pLAYER_03_MOEBIUS, 1, true);
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
int lv_i;
// Automatic Variable Declarations
unitgroup auto4198F952_g;
int auto4198F952_u;
unit auto4198F952_var;
// Variable Initialization
// Actions
if (!runActions) {
return true;
}
libVCMI_gf_SetWorkerRallyPointsPlayersNexuses(gv_pLAYER_01_USER);
TriggerExecute(gt_CelestialLockInit, true, false);
auto4198F952_g = UnitGroup("Bunker", gv_pLAYER_03_MOEBIUS, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
auto4198F952_u = UnitGroupCount(auto4198F952_g, c_unitCountAll);
for (;; auto4198F952_u -= 1) {
auto4198F952_var = UnitGroupUnitFromEnd(auto4198F952_g, auto4198F952_u);
if (auto4198F952_var == null) { break; }
UnitCargoCreate(auto4198F952_var, "Spectre", 2);
}
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Init03Units_Init () {
gt_Init03Units = TriggerCreate("gt_Init03Units_Func");
}
//--------------------------------------------------------------------------------------------------
// Trigger: Init 04 Music/Sound
//--------------------------------------------------------------------------------------------------
bool gt_Init04MusicSound_Func (bool testConds, bool runActions) {
// Automatic Variable Declarations
// Actions
if (!runActions) {
return true;
}
gv_mapMusicTrack = "PUlnar01_Music_Main";
return true;
}
//--------------------------------------------------------------------------------------------------
void gt_Init04MusicSound_Init () {
gt_Init04MusicSound = TriggerCreate("gt_Init04MusicSound_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");
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 autoD16B75A3_g;
int autoD16B75A3_u;
unit autoD16B75A3_var;
unitgroup auto5E0C6373_g;
int auto5E0C6373_u;
unit auto5E0C6373_var;
unitgroup auto7AD9F519_g;
int auto7AD9F519_u;
unit auto7AD9F519_var;
playergroup auto5EA5C360_g;
int auto5EA5C360_var;
// Actions
if (!runActions) {
return true;
}
UnitSetPropertyFixed(gv_titanicWarpPrism, c_unitPropShieldsRegen, libLotv_gf_DifficultyValueFixed2(2.0, 2.0, 6.0, 6.0));
UnitSetPropertyFixed(gv_titanicWarpPrism, c_unitPropLifeMax, libLotv_gf_DifficultyValueFixed2(1000.0, 1000.0, 1500.0, 2000.0));
UnitSetPropertyFixed(gv_titanicWarpPrism, c_unitPropShieldsMax, libLotv_gf_DifficultyValueFixed2(500.0, 500.0, 800.0, 1000.0));
UnitSetPropertyFixed(gv_titanicWarpPrism, c_unitPropLifePercent, 100.0);
UnitSetPropertyFixed(gv_titanicWarpPrism, c_unitPropShieldsPercent, 100.0);
autoD16B75A3_g = UnitGroup("Gateway", gv_pLAYER_02_TALDARIM, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
autoD16B75A3_u = UnitGroupCount(autoD16B75A3_g, c_unitCountAll);