-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlaststand.scar
751 lines (684 loc) · 43.7 KB
/
laststand.scar
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
-- laststand.scar
import("ScarUtil.scar");
function LastStand()
-- How many survivor? Yes, this is the checker for the lose condition.
g_survivor_count = 2;
g_survivor_count_total = 0;
-- Zombie Squad Groups, this is used for spawnng more and more zombies.
g_zombiecount = 0;
g_survival_time = 900; -- 15 mins
-- Integers for checking zombie players.
Player1_IsZombie = false;
Player2_IsZombie = false;
Player3_IsZombie = false;
Player4_IsZombie = false;
Player5_IsZombie = false;
Player6_IsZombie = false;
Player7_IsZombie = false;
Player8_IsZombie = false;
LastStand_Setup(); -- Setup function.
Rule_AddInterval(LastStand_CheckZombies, 0.5) -- Function that checks for dead zombies, for the zombies that are dead, they respawn in many amounts over time.
Rule_AddInterval(LastStand_CheckSquadsDead, 0.5) -- Lose rule, if no squads are left, the player loses.
Rule_AddInterval(LastStand_ZombieTactics, 30) -- Every 60 seconds, zombies randomly goes to starting position to starting position or attacks a player squad. Or does nothing.
Rule_AddInterval(LastStand_Reinforcements, 9999) -- Player gets spare reinforcements.
Rule_AddInterval(LastStand_MassiveWaves, g_massivewaves_timer) -- Massive armies of zombies marches toward the survivors every 10 minutes+.
Rule_AddInterval(LastStand_DemonRush, g_demonrush_timer) -- A demon lord is summoned in. Tough to deal with if unprepared
-- Create the ALPHA Zombie.
Util_CreateSquadsAtPosition(g_DefaultZombies, "chaos_squad_lord", "chaos_squad_cultist", Player_GetStartPosition(g_DefaultZombies), 1);
Rule_AddInterval(LastStand_AlphaZombie_Reinforcements, 90) -- Alpha Zombie spawns reinforcements of zombies over time.
Rule_AddInterval(LastStand_AlphaZombie_Tactic, 40) -- Alpha Zombie moves to places.
obj_table_LastStand_alphazombie = { title_id = 16600000, short_desc_id = 16600001, help_tip_id = 16600002 }
Objective_Add( obj_table_LastStand_alphazombie, true )
g_DefaultSurvivor_kills = Stats_PlayerUnitsKilled(Player_GetID(g_DefaultSurvivor))
--UI_ShowCountdown( 16600021 )
Rule_AddInterval(LastStand_Survival_KillCount, 1)
end
function LastStand_Survival_KillCount()
g_survival_time = g_survival_time - 1;
if (g_survival_time <= 1) then
Player_Kill(g_DefaultZombies)
World_SetTeamWin(g_DefaultSurvivor, "annihilate")
World_SetGameOver()
end
end
function LastStand_AlphaZombie_Reinforcements()
World_FXEventSquad("data:Art/Events/Chaos/Blood_Pulse", "chaos_squad_lord")
Util_CreateSquadsAtPosition(g_DefaultZombies, "sg_zombie1", "chaos_squad_cultist", SGroup_GetPosition("chaos_squad_lord"), i_alphazombiereinforcement);
Util_CreateSquadsAtPosition(g_DefaultZombies, "sg_zombie1", "chaos_squad_renegade_guardsmen", SGroup_GetPosition("chaos_squad_lord"), i_alphazombiereinforcement_2);
end
function LastStand_AlphaZombie_Tactic()
g_alphazombietactic = World_GetRand(1,1000);
if (SGroup_Exists("chaos_squad_lord")) then
if (g_alphazombietactic >= 850) then
Cmd_AttackMovePos("chaos_squad_lord", Player_GetStartPosition(g_DefaultZombies));
elseif (g_alphazombietactic <= 150) then
Cmd_StopSquads("chaos_squad_lord")
else
end
g_alphazombietactic = World_GetRand(1,1000);
end
end
function LastStand_Setup()
-- Destroy all starting hqs and starting positions.
local count = World_GetPlayerCount();
for j = 0, count-1 do
local Player = World_GetPlayerAt(j);
-- Destroy starting hq and builder unit. Idea thanks to Jaguar Lord.
Player_GetAllEntitiesNearPos(Player, "eg_destroy_player_entities", Player_GetStartPosition(Player), 15)
Player_GetAllSquadsNearPos(Player, "sg_destroy_player_squad", Player_GetStartPosition(Player), 15)
EGroup_DeSpawn("eg_destroy_player_entities")
SGroup_DeSpawn("sg_destroy_player_squad")
EGroup_DestroyAllEntities("eg_destroy_player_entities", true)
SGroup_DestroyAllSquads("sg_destroy_player_squad", true)
-- Is Zombie? Then set the zombies at base, and set the instance variable "Zombie?" to true.
if (Player_IsAlive(Player) and Cpu_IsCpuPlayer(Player)) then -- Basic function for checking zombie players.
Cpu_Enable(Player, false); -- Disable Cpu
g_DefaultZombies = Player;
-- Difficulty settings.
if (Cpu_GetDifficulty(g_DefaultZombies) == AD_Easy) then
i_zombiecountdifficulty = 1; -- Every zombie squad group killed, adds this amount per term.
g_massivewaves_timer = 1200; -- How many seconds it takes to spawn a massive wave of zombies.
g_demonrush_timer = 9999; -- How many seconds before a demon lord spawns in.
g_zombiecount_starting = 4; -- How many zombies SGroups spawns on game start.
g_zombiehealth_modifier = 0.75; -- Zombie health modifier number.
i_alphazombiereinforcement = 4; -- ALPHA zombie rules, zombie amount spawned every x seconds.
i_alphazombiereinforcement_2 = 2; -- ALPHA zombie rules, fast zombie amount spawned every x seconds.
i_zombiekillcount = 525; -- Survival rules, the required kills needed to pass the mission.
g_survival_time = 750; -- 12 mins
elseif (Cpu_GetDifficulty(g_DefaultZombies) == AD_Standard) then
i_zombiecountdifficulty = 2;
g_massivewaves_timer = 800;
g_demonrush_timer = 1200;
g_zombiecount_starting = 5;
g_zombiehealth_modifier = 1.0;
i_alphazombiereinforcement = 6;
i_alphazombiereinforcement_2 = 2;
i_zombiekillcount = 1050;
g_survival_time = 1100;
elseif (Cpu_GetDifficulty(g_DefaultZombies) == AD_Hard) then
i_zombiecountdifficulty = 2;
g_massivewaves_timer = 500;
g_demonrush_timer = 900;
g_zombiecount_starting = 6;
g_zombiehealth_modifier = 1.0;
i_alphazombiereinforcement = 8;
i_alphazombiereinforcement_2 = 4;
i_zombiekillcount = 3275;
g_survival_time = 1800
elseif (Cpu_GetDifficulty(g_DefaultZombies) == AD_Advanced) then
i_zombiecountdifficulty = 3;
g_massivewaves_timer = 450;
g_demonrush_timer = 800;
g_zombiecount_starting = 8;
g_zombiehealth_modifier = 1.5;
i_alphazombiereinforcement = 8;
i_alphazombiereinforcement_2 = 6;
i_zombiekillcount = 6000;
g_survival_time = 2700; -- 45 minutes
elseif (Cpu_GetDifficulty(g_DefaultZombies) == AD_Insane) then
i_zombiecountdifficulty = 3;
g_massivewaves_timer = 300;
g_demonrush_timer = 500;
g_zombiecount_starting = 10;
g_zombiehealth_modifier = 1.75;
i_alphazombiereinforcement = 8;
i_alphazombiereinforcement_2 = 6;
i_zombiekillcount = 9999;
g_survival_time = 3600; -- 1 hour
end
-- Setup the zombies! Bwa ha ha!
for i = 1, g_zombiecount_starting do
Util_CreateSquadsAtPositionRandom(Player, "sg_zombie"..i, "chaos_squad_cultist", Player_GetStartPosition(Player), 1);
g_zombiecount = g_zombiecount + 1;
end
if (j == 0) then Player1_IsZombie = true; g_Player1 = World_GetPlayerAt(0);
elseif (j == 1) then Player2_IsZombie = true; g_Player2 = World_GetPlayerAt(1);
elseif (j == 2) then Player3_IsZombie = true; g_Player3 = World_GetPlayerAt(2);
elseif (j == 3) then Player4_IsZombie = true; g_Player4 = World_GetPlayerAt(3);
elseif (j == 4) then Player5_IsZombie = true; g_Player5 = World_GetPlayerAt(4);
elseif (j == 5) then Player6_IsZombie = true; g_Player6 = World_GetPlayerAt(5);
elseif (j == 6) then Player7_IsZombie = true; g_Player7 = World_GetPlayerAt(6);
elseif (j == 7) then Player8_IsZombie = true; g_Player8 = World_GetPlayerAt(7);
end
local oHealthModifier = Modifier_Create(MAT_Player, "health_maximum_player_modifier", MUT_Multiplication, false, g_zombiehealth_modifier, "")
Modifier_ApplyToPlayer(oHealthModifier, Player)
-- Set all zombies as team mates.
Player_SetTeam(Player, 1);
-- Is human? Then set the Tactical Marines and civilians at start, set resource rates and resources to 0.
elseif (Player_IsAlive(Player)) then
Player_SetResource(Player, RT_Power, 9999);
Player_SetResource(Player, RT_Requisition, 9999);
local reqmodifier = Modifier_Create(MAT_Player, "income_requisition_player_modifier", MUT_Multiplication, false, 2, "")
local powermodifier = Modifier_Create(MAT_Player, "income_power_player_modifier", MUT_Multiplication, false, 1, "")
if (Player_GetRaceName(Player) == "chaos_marine_race") then
blueprint_commander = "chaos_squad_lord"; -- Main commander unit
blueprint_squad = "chaos_squad_chaos_terminator"; -- (Powerful) Ranged squad that can cap points
blueprint_builder_squad = "chaos_squad_slave"; -- Builder unit
blueprint_secondary = "chaos_squad_sorcerer"; -- Secondary commander
blueprint_tertiary = "chaos_squad_dark_apostle"; -- Additional commander
blueprint_medic = "chaos_squad_renegade_heavyweapons"; -- Healing unit / additional unit if not possible
Player_GrantResearch (Player,"chaos_wargear01");
Player_GrantResearch (Player,"chaos_wargear02");
Player_GrantResearch (Player,"chaos_wargear03");
Player_GrantResearch (Player,"chaos_wargear04");
Player_GrantResearch (Player,"chaos_wargear05");
Player_GrantResearch (Player,"chaos_wargear06");
Player_GrantResearch (Player,"chaos_wargear07");
Player_GrantResearch (Player,"chaos_wargear08");
Player_GrantResearch (Player,"chaos_wargear09");
Player_GrantResearch (Player,"mark_chaos");
Player_GrantResearch (Player,"mark_chaos_khorne");
Player_GrantResearch (Player,"mark_chaos_nurgle");
Player_GrantResearch (Player,"mark_chaos_slaanesh");
Player_GrantResearch (Player,"mark_chaos_tzeentch");
Player_GrantResearch (Player,"chaos_commander_health_research_1");
Player_GrantResearch (Player,"chaos_commander_health_research_2");
Player_GrantResearch (Player,"chaos_health_upgrade_research");
Player_GrantResearch (Player,"chaos_health_upgrade_research_2");
Player_GrantResearch (Player,"chaos_lord_research_1");
Player_GrantResearch (Player,"chaos_lord_research_2");
Player_GrantResearch (Player,"chaos_frag_grenade_research");
Player_GrantResearch (Player,"chaos_plasma_pistol_research");
Player_GrantResearch (Player,"chaos_champion_melee_research_1");
Player_GrantResearch (Player,"chaos_champion_melee_research_2");
Player_GrantResearch (Player,"chaos_max_weapons_research");
Player_GrantResearch (Player,"chaos_accuracy_upgrade_research");
Player_GrantResearch (Player,"chaos_accuracy_upgrade_research_2");
-- Dark Eldar
elseif (Player_GetRaceName(Player) == "dark_eldar_race") then
blueprint_commander = "dark_eldar_squad_archon_survival";
blueprint_squad = "dark_eldar_squad_warrior";
blueprint_builder_squad = "dark_eldar_squad_slave";
Player_GrantResearch (Player,"dark_eldar_wargear01");
Player_GrantResearch (Player,"dark_eldar_wargear02");
Player_GrantResearch (Player,"dark_eldar_wargear03");
Player_GrantResearch (Player,"dark_eldar_wargear04");
Player_GrantResearch (Player,"dark_eldar_wargear05");
Player_GrantResearch (Player,"dark_eldar_wargear06");
Player_GrantResearch (Player,"dark_eldar_wargear07");
Player_GrantResearch (Player,"dark_eldar_wargear08");
Player_GrantResearch (Player,"dark_eldar_wargear09");
Player_GrantResearch (Player,"dark_eldar_wargear10");
Player_GrantResearch (Player,"dark_eldar_crucible_of_malediction_research");
Player_GrantResearch (Player,"dark_eldar_poison_blades_research");
Player_GrantResearch (Player,"dark_eldar_range_increase_research");
Player_GrantResearch (Player,"dark_eldar_stinger_research");
Player_GrantResearch (Player,"dark_eldar_upgrade_agonizer");
Player_GrantResearch (Player,"dark_eldar_upgrade_commander_health");
Player_GrantResearch (Player,"dark_eldar_upgrade_commander_health_2");
Player_GrantResearch (Player,"dark_eldar_upgrade_infantry_health");
Player_GrantResearch (Player,"dark_eldar_upgrade_destructor");
Player_GrantResearch (Player,"dark_eldar_upgrade_retinue_size_1");
Player_GrantResearch (Player,"dark_eldar_upgrade_retinue_size_2");
Player_GrantResearch (Player,"dark_eldar_upgrade_retinue_size_3");
Player_GrantResearch (Player,"dark_eldar_upgrade_soulseeker_ammunition");
-- Eldar
elseif (Player_GetRaceName(Player) == "eldar_race") then
blueprint_commander = "eldar_squad_farseer";
blueprint_squad = "eldar_squad_dark_reapers";
blueprint_builder_squad = "eldar_squad_bonesinger";
blueprint_secondary = "eldar_harlequin_squad";
blueprint_tertiary = "eldar_squad_seer_council";
blueprint_medic = "eldar_squad_autarch";
Player_GrantResearch (Player,"eldar_bonesinger_ability_research_1");
Player_GrantResearch (Player,"eldar_farseer_ability_research");
Player_GrantResearch (Player,"eldar_farseer_ability_research_2");
Player_GrantResearch (Player,"eldar_farseer_ability_research_3");
Player_GrantResearch (Player,"eldar_fleet_of_foot_research");
Player_GrantResearch (Player,"eldar_haywire_bomb_research");
Player_GrantResearch (Player,"eldar_research_farseerhealth_1");
Player_GrantResearch (Player,"eldar_research_farseerhealth_2");
Player_GrantResearch (Player,"eldar_research_infantryaccuracy_1");
Player_GrantResearch (Player,"eldar_research_infantryaccuracy_2");
Player_GrantResearch (Player,"eldar_research_infantryhealth_1");
Player_GrantResearch (Player,"eldar_research_infantryhealth_2");
Player_GrantResearch (Player,"eldar_warlock_ability_research");
Player_GrantResearch (Player,"eldar_warlock_ability_research_1");
Player_GrantResearch (Player,"eldar_wargear01");
Player_GrantResearch (Player,"eldar_wargear02");
Player_GrantResearch (Player,"eldar_wargear03");
Player_GrantResearch (Player,"eldar_wargear04");
Player_GrantResearch (Player,"eldar_wargear05");
Player_GrantResearch (Player,"eldar_wargear06");
Player_GrantResearch (Player,"eldar_wargear07");
Player_GrantResearch (Player,"eldar_wargear08");
Player_GrantResearch (Player,"eldar_wargear09");
Player_GrantResearch (Player,"eldar_wargear10");
-- Imperial Guard
elseif (Player_GetRaceName(Player) == "guard_race") then
blueprint_commander = "guard_squad_command_squad";
blueprint_squad = "guard_squad_guardsmen";
blueprint_builder_squad = "guard_squad_enginseer";
blueprint_secondary = "guard_squad_assassin";
blueprint_tertiary = "guard_squad_inq";
blueprint_medic = "guard_heavy_weapons_team_squad";
Player_GrantResearch (Player,"guard_research_command_squad_size");
Player_GrantResearch (Player,"guard_guardsman_morale");
Player_GrantResearch (Player,"guard_guardsman_morale_2");
Player_GrantResearch (Player,"guard_upgrade_guardsmen_health");
Player_GrantResearch (Player,"guard_upgrade_guardsmen_range");
Player_GrantResearch (Player,"guard_upgrade_weapon_specialization");
Player_GrantResearch (Player,"guard_wargear01");
Player_GrantResearch (Player,"guard_wargear02");
Player_GrantResearch (Player,"guard_wargear03");
Player_GrantResearch (Player,"guard_wargear04");
Player_GrantResearch (Player,"guard_wargear05");
Player_GrantResearch (Player,"guard_wargear06");
Player_GrantResearch (Player,"guard_wargear07");
Player_GrantResearch (Player,"guard_wargear08");
Player_GrantResearch (Player,"guard_wargear09");
Player_GrantResearch (Player,"guard_wargear10");
-- Inquisition Daemonhunters
elseif (Player_GetRaceName(Player) == "inquisition_daemonhunt_race") then
blueprint_commander = "inquisition_squad_inquisitor_lord";
blueprint_squad = "inquisition_squad_grey_knights_terminator";
blueprint_builder_squad = "inquisition_squad_archivist";
blueprint_secondary = "inquisition_squad_grey_knight_Librarian";
blueprint_tertiary = "inquisition_squad_grey_knight_hero";
blueprint_medic = "inquisition_squad_scholars";
Player_GrantResearch (Player,"inquisition_medikits");
Player_GrantResearch (Player,"inquisition_officers_weapons");
Player_GrantResearch (Player,"inquisition_advanced_weapons");
Player_GrantResearch (Player,"inquisition_advanced_weapons_2");
Player_GrantResearch (Player,"inquisition_special_squads");
Player_GrantResearch (Player,"inquisition_psy_power_1");
Player_GrantResearch (Player,"inquisition_psy_power_2");
Player_GrantResearch (Player,"inquisition_psy_power_3");
Player_GrantResearch (Player,"inquisition_targeters");
Player_GrantResearch (Player,"inquisition_temporal_power");
-- Necrons
elseif (Player_GetRaceName(Player) == "necron_race") then
blueprint_commander = "necron_lord_squad";
blueprint_squad = "necron_basic_warrior_squad";
blueprint_builder_squad = "necron_builder_scarab_squad";
blueprint_secondary = "necron_night_bringer";
blueprint_tertiary = "necron_deceiver";
blueprint_medic = "necron_lord_destroyer_squad";
Player_GrantResearch (Player,"necron_phylactery_research");
Player_GrantResearch (Player,"necron_resurrection_orb_research");
Player_GrantResearch (Player,"necron_nightmare_shroud_research");
Player_GrantResearch (Player,"necron_warrior_boost");
Player_GrantResearch (Player,"necron_warrior_boost_2");
Player_GrantResearch (Player,"necron_wargear01");
Player_GrantResearch (Player,"necron_wargear02");
Player_GrantResearch (Player,"necron_wargear03");
Player_GrantResearch (Player,"necron_wargear04");
Player_GrantResearch (Player,"necron_wargear05");
Player_GrantResearch (Player,"necron_wargear06");
Player_GrantResearch (Player,"necron_wargear07");
Player_GrantResearch (Player,"necron_wargear09");
Player_GrantResearch (Player,"necron_wargear10");
-- Orks
elseif (Player_GetRaceName(Player) == "ork_race") then
blueprint_commander = "ork_squad_warboss";
blueprint_squad = "ork_flash_gitz_squad";
blueprint_builder_squad = "ork_squad_grot";
blueprint_secondary = "ork_squad_mek_boy";
blueprint_tertiary = "ork_squad_weirdboy";
blueprint_medic = "ork_squad_bad_dok";
Player_GrantResearch (Player,"ork_research_big_mek_1");
Player_GrantResearch (Player,"ork_research_big_mek_2");
Player_GrantResearch (Player,"ork_research_morechoppy");
Player_GrantResearch (Player,"ork_research_evenmorechoppy");
Player_GrantResearch (Player,"ork_research_tankbustabombs");
Player_GrantResearch (Player,"ork_research_tougher_bosses");
Player_GrantResearch (Player,"ork_research_tougher_bosses_2");
Player_GrantResearch (Player,"ork_research_eavy_armor_boyz");
Player_GrantResearch (Player,"ork_research_eavy_armor_boyz_2");
Player_GrantResearch (Player,"ork_research_tougherorks");
Player_GrantResearch (Player,"ork_research_tougherorks_2");
Player_GrantResearch (Player,"ork_research_moredakka");
Player_GrantResearch (Player,"ork_research_evenmoredakka");
Player_GrantResearch (Player,"ork_research_eavy_armour");
Player_GrantResearch (Player,"ork_research_eavy_armor_2");
Player_GrantResearch (Player,"ork_wargear01");
Player_GrantResearch (Player,"ork_wargear02");
Player_GrantResearch (Player,"ork_wargear03");
Player_GrantResearch (Player,"ork_wargear04");
Player_GrantResearch (Player,"ork_wargear05");
Player_GrantResearch (Player,"ork_wargear06");
Player_GrantResearch (Player,"ork_wargear07");
Player_GrantResearch (Player,"ork_wargear08");
Player_GrantResearch (Player,"ork_wargear09");
Player_GrantResearch (Player,"ork_wargear10");
Player_SetResource(Player, RT_Pop,200);
-- Space Marines
elseif (Player_GetRaceName(Player) == "space_marine_race") then
blueprint_commander = "space_marine_squad_force_commander";
blueprint_squad = "space_marine_squad_tactical";
blueprint_builder_squad = "space_marine_squad_servitor";
blueprint_secondary = "space_marine_squad_librarian";
blueprint_tertiary = "space_marine_squad_chaplain";
blueprint_medic = "space_marine_squad_apothecary";
Player_GrantResearch (Player,"marine_force_commander_research_2");
Player_GrantResearch (Player,"marine_commander_health_research_1");
Player_GrantResearch (Player,"marine_commander_health_research_2");
Player_GrantResearch (Player,"marine_accuracy_upgrade_research");
Player_GrantResearch (Player,"marine_accuracy_upgrade_research_2");
Player_GrantResearch (Player,"marine_health_upgrade_research");
Player_GrantResearch (Player,"marine_health_upgrade_research_2");
Player_GrantResearch (Player,"marine_max_weapons_research");
Player_GrantResearch (Player,"marine_frag_grenade_research");
Player_GrantResearch (Player,"marine_sergeant_melee_upgrade_1");
Player_GrantResearch (Player,"marine_sergeant_ranged_upgrade_1");
Player_GrantResearch (Player,"marine_wargear01");
Player_GrantResearch (Player,"marine_wargear02");
Player_GrantResearch (Player,"marine_wargear03");
Player_GrantResearch (Player,"marine_wargear04");
Player_GrantResearch (Player,"marine_wargear05");
Player_GrantResearch (Player,"marine_wargear06");
Player_GrantResearch (Player,"marine_wargear07");
Player_GrantResearch (Player,"marine_wargear09");
Player_GrantResearch (Player,"marine_wargear10");
-- Tau Empire
elseif (Player_GetRaceName(Player) == "tau_race") then
blueprint_commander = "tau_commander_squad";
blueprint_squad = "tau_fire_warrior_squad";
blueprint_builder_squad = "tau_builder_squad";
blueprint_secondary = "tau_xv89_commander_squad";
blueprint_tertiary = "tau_ethereal_squad";
blueprint_medic = "tau_sniper_squad";
Player_GrantResearch (Player,"tau_wargear01");
Player_GrantResearch (Player,"tau_wargear02");
Player_GrantResearch (Player,"tau_wargear03");
Player_GrantResearch (Player,"tau_wargear04");
Player_GrantResearch (Player,"tau_wargear05");
Player_GrantResearch (Player,"tau_wargear06");
Player_GrantResearch (Player,"tau_wargear07");
Player_GrantResearch (Player,"tau_wargear09");
Player_GrantResearch (Player,"tau_wargear10");
Player_GrantResearch (Player,"tau_targeting_optics");
Player_GrantResearch (Player,"tau_improved_power_source_research");
Player_GrantResearch (Player,"tau_improved_metallurgy");
-- Tyranid Swarm
elseif (Player_GetRaceName(Player) == "tyranids_race") then
blueprint_commander = "tyranids_squad_hive_tyrant_survival";
blueprint_squad = "tyranids_squad_warrior_survival";
blueprint_builder_squad = "tyranids_squad_woth";
Player_GrantResearch (Player,"tyranids_hivetyrant_implant_research");
Player_GrantResearch (Player,"tyranids_hivetyrant_lwhip_bsword_research");
Player_GrantResearch (Player,"tyranids_hivetyrant_toxic_miasma_research");
Player_GrantResearch (Player,"tyranids_hivetyrant_warp_field_research");
Player_GrantResearch (Player,"tyranids_warrior_adrenal_glands_research");
Player_GrantResearch (Player,"tyranids_warrior_bioplasma_research");
Player_GrantResearch (Player,"tyranids_warrior_ext_carapace_research");
Player_GrantResearch (Player,"tyranids_warrior_leaping_research");
-- Witch Hunters
elseif (Player_GetRaceName(Player) == "witch_hunters_race") then
blueprint_commander = "witch_hunters_squad_canoness_survival";
blueprint_squad = "witch_hunters_squad_retributor";
blueprint_builder_squad = "space_marine_squad_servitor"; -- the normal builders fucking suck
blueprint_secondary = "witch_hunters_squad_female_inquisitor_command_squad";
blueprint_tertiary = "witch_hunters_squad_eversor";
blueprint_medic = "witch_hunters_squad_geminae_superia";
Player_GrantResearch (Player,"witch_hunters_research_actoffaith_emperor_light");
Player_GrantResearch (Player,"witch_hunters_research_actoffaith_hand_emperor");
Player_GrantResearch (Player,"witch_hunters_research_actoffaith_spirit_martyr");
Player_GrantResearch (Player,"witch_hunters_research_adepta_sororitas_frag_grenade");
Player_GrantResearch (Player,"witch_hunters_research_adepta_sororitas_melta_bomb");
Player_GrantResearch (Player,"witch_hunters_research_canoness_jetpack");
Player_GrantResearch (Player,"witch_hunters_research_canoness_liber_heresius");
Player_GrantResearch (Player,"witch_hunters_research_canoness_mantle_orphelia");
Player_GrantResearch (Player,"witch_hunters_research_canoness_psychic_hood");
Player_GrantResearch (Player,"witch_hunters_research_celestian_holy_hatred");
Player_GrantResearch (Player,"witch_hunters_research_female_inquisitor_exagrammic_wards");
Player_GrantResearch (Player,"witch_hunters_research_female_inquisitor_scourging");
Player_GrantResearch (Player,"witch_hunters_research_sororitas_dominion");
Player_GrantResearch (Player,"witch_hunters_research_sororitas_maximum_health");
Player_GrantResearch (Player,"witch_hunters_shrine_faith_shield");
end
Modifier_ApplyToPlayer(reqmodifier, Player)
Modifier_ApplyToPlayer(powermodifier, Player)
Util_CreateSquadsAtPositionEx(Player, "sg_survivor_commander", blueprint_commander, Player_GetStartPosition(Player), 1, 1);
for i = 1, 1 do
Util_CreateSquadsAtPositionEx(Player, "sg_survivor"..i, blueprint_builder_squad, Player_GetStartPosition(Player), 1, 1);
Util_CreateSquadsAtPositionEx(Player, "sg_survivor"..i, blueprint_squad, Player_GetStartPosition(Player), 1, 1);
Util_CreateSquadsAtPositionEx(Player, "sg_survivor"..i, blueprint_medic, Player_GetStartPosition(Player), 1, 1);
Util_CreateSquadsAtPositionEx(Player, "sg_survivor"..i, blueprint_secondary, Player_GetStartPosition(Player), 1, 1);
Util_CreateSquadsAtPositionEx(Player, "sg_survivor"..i, blueprint_tertiary, Player_GetStartPosition(Player), 1, 1);
end
g_survivor_count_total = 2;
-- Set Survivor as opposite team of zombies.
Player_SetTeam(Player, 0);
g_DefaultSurvivor = Player;
end
end
end
function LastStand_CheckZombies()
g_random_reinforcement_amount = World_GetRand(1,4); -- Make random squads of up to 4
g_random_reinforcement_type = World_GetRand(1,4); -- Switch up the enemies we'll be facing
for i = 1, g_zombiecount do
if (SGroup_Exists("sg_zombie"..i) and SGroup_Count("sg_zombie"..i) < 1) then
Util_CreateSquadsAtPosition(g_DefaultZombies, "sg_zombie"..i, "chaos_squad_renegade_guardsmen", Player_GetStartPosition(g_DefaultZombies), g_random_reinforcement_amount);
if (Player1_IsZombie == true and g_random_reinforcement_type == 1) then
Util_CreateSquadsAtPosition(g_Player1, "sg_zombie"..i, "chaos_squad_cultist", Player_GetStartPosition(g_Player1), g_random_reinforcement_amount); -- Weak melee enemy
elseif (Player1_IsZombie == true and g_random_reinforcement_type == 2) then
Util_CreateSquadsAtPosition(g_Player1, "sg_zombie"..i, "chaos_squad_renegade_guardsmen", Player_GetStartPosition(g_Player1), g_random_reinforcement_amount); -- Weak ranged enemy
elseif (Player1_IsZombie == true and g_random_reinforcement_type == 3) then
Util_CreateSquadsAtPosition(g_Player1, "sg_zombie"..i, "chaos_squad_renegade_commando", Player_GetStartPosition(g_Player1), g_random_reinforcement_amount); -- Medium ranged enemy
elseif (Player1_IsZombie == true and g_random_reinforcement_type == 4) then
Util_CreateSquadsAtPosition(g_Player1, "sg_zombie"..i, "chaos_marine_plague_squad", Player_GetStartPosition(g_Player1), g_random_reinforcement_amount); -- Medium melee enemy
end
if (Player2_IsZombie == true and g_random_reinforcement_type == 1) then
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..i, "chaos_squad_cultist", Player_GetStartPosition(g_Player2), g_random_reinforcement_amount);
elseif (Player2_IsZombie == true and g_random_reinforcement_type == 2) then
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..i, "chaos_squad_renegade_guardsmen", Player_GetStartPosition(g_Player2), g_random_reinforcement_amount);
elseif (Player2_IsZombie == true and g_random_reinforcement_type == 3) then
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..i, "chaos_squad_renegade_commando", Player_GetStartPosition(g_Player2), g_random_reinforcement_amount);
elseif (Player2_IsZombie == true and g_random_reinforcement_type == 4) then
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..i, "chaos_marine_plague_squad", Player_GetStartPosition(g_Player2), g_random_reinforcement_amount);
end
if (Player3_IsZombie == true and g_random_reinforcement_type == 1) then
Util_CreateSquadsAtPosition(g_Player3, "sg_zombie"..i, "chaos_squad_cultist", Player_GetStartPosition(g_Player3), g_random_reinforcement_amount);
elseif (Player3_IsZombie == true and g_random_reinforcement_type == 2) then
Util_CreateSquadsAtPosition(g_Player3, "sg_zombie"..i, "chaos_squad_renegade_guardsmen", Player_GetStartPosition(g_Player3), g_random_reinforcement_amount);
elseif (Player3_IsZombie == true and g_random_reinforcement_type == 3) then
Util_CreateSquadsAtPosition(g_Player3, "sg_zombie"..i, "chaos_squad_renegade_commando", Player_GetStartPosition(g_Player3), g_random_reinforcement_amount);
elseif (Player3_IsZombie == true and g_random_reinforcement_type == 4) then
Util_CreateSquadsAtPosition(g_Player3, "sg_zombie"..i, "chaos_marine_plague_squad", Player_GetStartPosition(g_Player3), g_random_reinforcement_amount);
end
if (Player4_IsZombie == true and g_random_reinforcement_type == 1) then
Util_CreateSquadsAtPosition(g_Player4, "sg_zombie"..i, "chaos_squad_cultist", Player_GetStartPosition(g_Player4), g_random_reinforcement_amount);
elseif (Player4_IsZombie == true and g_random_reinforcement_type == 2) then
Util_CreateSquadsAtPosition(g_Player4, "sg_zombie"..i, "chaos_squad_renegade_guardsmen", Player_GetStartPosition(g_Player4), g_random_reinforcement_amount);
elseif (Player4_IsZombie == true and g_random_reinforcement_type == 3) then
Util_CreateSquadsAtPosition(g_Player4, "sg_zombie"..i, "chaos_squad_renegade_commando", Player_GetStartPosition(g_Player4), g_random_reinforcement_amount);
elseif (Player4_IsZombie == true and g_random_reinforcement_type == 4) then
Util_CreateSquadsAtPosition(g_Player4, "sg_zombie"..i, "chaos_marine_plague_squad", Player_GetStartPosition(g_Player4), g_random_reinforcement_amount);
end
if (Player5_IsZombie == true and g_random_reinforcement_type == 1) then
Util_CreateSquadsAtPosition(g_Player5, "sg_zombie"..i, "chaos_squad_cultist", Player_GetStartPosition(g_Player5), g_random_reinforcement_amount);
elseif (Player5_IsZombie == true and g_random_reinforcement_type == 2) then
Util_CreateSquadsAtPosition(g_Player5, "sg_zombie"..i, "chaos_squad_renegade_guardsmen", Player_GetStartPosition(g_Player5), g_random_reinforcement_amount);
elseif (Player5_IsZombie == true and g_random_reinforcement_type == 3) then
Util_CreateSquadsAtPosition(g_Player5, "sg_zombie"..i, "chaos_squad_renegade_commando", Player_GetStartPosition(g_Player5), g_random_reinforcement_amount);
elseif (Player5_IsZombie == true and g_random_reinforcement_type == 4) then
Util_CreateSquadsAtPosition(g_Player5, "sg_zombie"..i, "chaos_marine_plague_squad", Player_GetStartPosition(g_Player5), g_random_reinforcement_amount);
end
if (Player6_IsZombie == true and g_random_reinforcement_type == 1) then
Util_CreateSquadsAtPosition(g_Player6, "sg_zombie"..i, "chaos_squad_cultist", Player_GetStartPosition(g_Player6), g_random_reinforcement_amount);
elseif (Player6_IsZombie == true and g_random_reinforcement_type == 2) then
Util_CreateSquadsAtPosition(g_Player6, "sg_zombie"..i, "chaos_squad_renegade_guardsmen", Player_GetStartPosition(g_Player6), g_random_reinforcement_amount);
elseif (Player6_IsZombie == true and g_random_reinforcement_type == 3) then
Util_CreateSquadsAtPosition(g_Player6, "sg_zombie"..i, "chaos_squad_renegade_commando", Player_GetStartPosition(g_Player6), g_random_reinforcement_amount);
elseif (Player6_IsZombie == true and g_random_reinforcement_type == 4) then
Util_CreateSquadsAtPosition(g_Player6, "sg_zombie"..i, "chaos_marine_plague_squad", Player_GetStartPosition(g_Player6), g_random_reinforcement_amount);
end
if (Player7_IsZombie == true and g_random_reinforcement_type == 1) then
Util_CreateSquadsAtPosition(g_Player7, "sg_zombie"..i, "chaos_squad_cultist", Player_GetStartPosition(g_Player7), g_random_reinforcement_amount);
elseif (Player7_IsZombie == true and g_random_reinforcement_type == 2) then
Util_CreateSquadsAtPosition(g_Player7, "sg_zombie"..i, "chaos_squad_renegade_guardsmen", Player_GetStartPosition(g_Player7), g_random_reinforcement_amount);
elseif (Player7_IsZombie == true and g_random_reinforcement_type == 3) then
Util_CreateSquadsAtPosition(g_Player7, "sg_zombie"..i, "chaos_squad_renegade_commando", Player_GetStartPosition(g_Player7), g_random_reinforcement_amount);
elseif (Player7_IsZombie == true and g_random_reinforcement_type == 4) then
Util_CreateSquadsAtPosition(g_Player7, "sg_zombie"..i, "chaos_marine_plague_squad", Player_GetStartPosition(g_Player7), g_random_reinforcement_amount);
end
if (Player8_IsZombie == true and g_random_reinforcement_type == 1) then
Util_CreateSquadsAtPosition(g_Player8, "sg_zombie"..i, "chaos_squad_cultist", Player_GetStartPosition(g_Player8), g_random_reinforcement_amount);
elseif (Player8_IsZombie == true and g_random_reinforcement_type == 2) then
Util_CreateSquadsAtPosition(g_Player8, "sg_zombie"..i, "chaos_squad_renegade_guardsmen", Player_GetStartPosition(g_Player8), g_random_reinforcement_amount);
elseif (Player8_IsZombie == true and g_random_reinforcement_type == 3) then
Util_CreateSquadsAtPosition(g_Player8, "sg_zombie"..i, "chaos_squad_renegade_commando", Player_GetStartPosition(g_Player8), g_random_reinforcement_amount);
elseif (Player8_IsZombie == true and g_random_reinforcement_type == 4) then
Util_CreateSquadsAtPosition(g_Player8, "sg_zombie"..i, "chaos_marine_plague_squad", Player_GetStartPosition(g_Player8), g_random_reinforcement_amount);
end
g_zombiecount = g_zombiecount + i_zombiecountdifficulty;
end
end
end
function LastStand_CheckSquadsDead()
for i_survivor_count = 1, 1 do
if (SGroup_Count("sg_survivor"..i_survivor_count) < 1 and SGroup_Exists("sg_dummysquad"..i_survivor_count) == false) then
SGroup_CreateIfNotFound("sg_dummysquad"..i_survivor_count);
g_survivor_count = g_survivor_count - 1;
if (g_survivor_count == 0) then
if (SGroup_Exists("sg_survivor_commander") and SGroup_Count("sg_survivor_commander") < 1 and g_fc_died == 1) then
Player_Kill(g_DefaultSurvivor)
Util_CheckOneTeamLeft("LastStand")
end
end
end
end
if (SGroup_Exists("chaos_squad_lord") and SGroup_Count("chaos_squad_lord") < 1) then
Player_Kill(g_DefaultZombies)
World_SetTeamWin(g_DefaultSurvivor, "assassinate")
World_SetGameOver()
end
if (SGroup_Exists("sg_survivor_commander") and SGroup_Count("sg_survivor_commander") < 1 and g_fc_died == nil) then
Util_MissionTitle("Your Commander died!")
g_fc_died = 1;
end
end
function LastStand_ZombieTactics()
g_zombietactic = World_GetRand(1,1000);
for i = 1, g_zombiecount do
if (SGroup_Exists("sg_zombie"..i)) then
if (g_zombietactic >= 950) then
Cmd_AttackMovePos("sg_zombie"..i, Player_GetStartPosition(g_DefaultZombies));
elseif (g_zombietactic >= 900) then
Cmd_StopSquads("sg_zombie"..i)
elseif (g_zombietactic >= 800) then
LastStand_ZombieTactics_MoveTo();
Cmd_AttackMovePos("sg_zombie"..i, Player_GetStartPosition(g_zombiemovement_position));
else
for ii = 1, 11 do
if (SGroup_Exists("sg_survivor"..ii) and SGroup_Count("sg_survivor"..ii) >= 1) then
Cmd_AttackMovePos("sg_zombie"..i, SGroup_GetPosition("sg_survivor"..ii));
end
end
end
g_zombietactic = World_GetRand(1,1000);
end
end
end
function LastStand_ZombieTactics_MoveTo()
g_zombiemovement_random = World_GetRand(1,800);
if (Player1_IsZombie == true and g_zombietactic <= 100) then
g_zombiemovement_position = g_Player1;
elseif (Player2_IsZombie == true and g_zombietactic <= 200) then
g_zombiemovement_position = g_Player2;
elseif (Player3_IsZombie == true and g_zombietactic <= 300) then
g_zombiemovement_position = g_Player3;
elseif (Player4_IsZombie == true and g_zombietactic <= 400) then
g_zombiemovement_position = g_Player4;
elseif (Player5_IsZombie == true and g_zombietactic <= 500) then
g_zombiemovement_position = g_Player5;
elseif (Player6_IsZombie == true and g_zombietactic <= 600) then
g_zombiemovement_position = g_Player6;
elseif (Player7_IsZombie == true and g_zombietactic <= 700) then
g_zombiemovement_position = g_Player7;
elseif (Player8_IsZombie == true and g_zombietactic <= 800) then
g_zombiemovement_position = g_Player8;
else g_zombiemovement_position = g_DefaultZombies;
end
end
function LastStand_Reinforcements()
if (SGroup_Exists("sg_survivor_commander") and SGroup_Count("sg_survivor_commander") >= 1) then
g_survivor_count_total = g_survivor_count_total + 1;
Util_CreateSquadsAtPositionEx(g_DefaultSurvivor, "sg_survivor"..g_survivor_count_total, blueprint_squad, SGroup_GetPosition("sg_survivor_commander"), 1, 1);
World_FXEventSquad("data:Art/Events/Unit_Upgrade_Morale_FX/reinforce_marine_trooper", "sg_survivor_commander")
local warning = ("Reinforcements arrived!")
EventCue_DoEvent("reinforce", "taskbar_button_click", warning, warning)
g_reinforcement = 1;
g_survivor_count = g_survivor_count + 1;
end
end
function LastStand_MassiveWaves()
if (Player1_IsZombie == true) then
Util_CreateSquadsAtPosition(g_Player1, "sg_zombie"..g_zombiecount, "chaos_squad_cultist", Player_GetStartPosition(g_Player1), 20);
Util_CreateSquadsAtPosition(g_Player1, "sg_zombie"..g_zombiecount, "chaos_squad_renegade_guardsmen", Player_GetStartPosition(g_Player1), 5);
Util_CreateSquadsAtPosition(g_Player1, "sg_zombie"..g_zombiecount, "chaos_squad_lieutenant", Player_GetStartPosition(g_Player1), 1);
end
if (Player2_IsZombie == true) then
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_khorne_berserker", Player_GetStartPosition(g_Player2), 5);
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_renegade_commando", Player_GetStartPosition(g_Player2), 5);
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_possessed_marine", Player_GetStartPosition(g_Player2), 2);
end
if (Player3_IsZombie == true) then
Util_CreateSquadsAtPosition(g_Player3, "sg_zombie"..g_zombiecount, "chaos_squad_dark_apostle", Player_GetStartPosition(g_Player3), 2);
Util_CreateSquadsAtPosition(g_Player3, "sg_zombie"..g_zombiecount, "chaos_squad_bloodletters", Player_GetStartPosition(g_Player3), 2);
Util_CreateSquadsAtPosition(g_Player3, "sg_zombie"..g_zombiecount, "chaos_icon_bearer_undivided", Player_GetStartPosition(g_Player3), 2);
end
if (Player4_IsZombie == true) then
Util_CreateSquadsAtPosition(g_Player4, "sg_zombie"..g_zombiecount, "chaos_renegade_heavyweapons", Player_GetStartPosition(g_Player4), 4);
Util_CreateSquadsAtPosition(g_Player4, "sg_zombie"..g_zombiecount, "chaos_icon_bearer_undivided", Player_GetStartPosition(g_Player4), 2);
end
if (Player5_IsZombie == true) then
Util_CreateSquadsAtPosition(g_Player5, "sg_zombie"..g_zombiecount, "chaos_squad_renegade_leader", Player_GetStartPosition(g_Player5), 2);
Util_CreateSquadsAtPosition(g_Player5, "sg_zombie"..g_zombiecount, "chaos_squad_renegade_commando", Player_GetStartPosition(g_Player5), 5);
Util_CreateSquadsAtPosition(g_Player5, "sg_zombie"..g_zombiecount, "chaos_icon_bearer_undivided", Player_GetStartPosition(g_Player5), 2);
end
if (Player6_IsZombie == true) then
Util_CreateSquadsAtPosition(g_Player6, "sg_zombie"..g_zombiecount, "chaos_squad_cultist", Player_GetStartPosition(g_Player6), 10);
Util_CreateSquadsAtPosition(g_Player6, "sg_zombie"..g_zombiecount, "chaos_icon_bearer_undivided", Player_GetStartPosition(g_Player6), 2);
end
if (Player7_IsZombie == true) then
Util_CreateSquadsAtPosition(g_Player7, "sg_zombie"..g_zombiecount, "chaos_renegade_heavyweapons", Player_GetStartPosition(g_Player7), 3);
Util_CreateSquadsAtPosition(g_Player7, "sg_zombie"..g_zombiecount, "chaos_icon_bearer_undivided", Player_GetStartPosition(g_Player7), 2);
Util_CreateSquadsAtPosition(g_Player7, "sg_zombie"..g_zombiecount, "chaos_squad_renegade_ogryn", Player_GetStartPosition(g_Player7), 2);
end
if (Player8_IsZombie == true) then
Util_CreateSquadsAtPosition(g_Player8, "sg_zombie"..g_zombiecount, "chaos_squad_obliterator", Player_GetStartPosition(g_Player8), 2);
Util_CreateSquadsAtPosition(g_Player8, "sg_zombie"..g_zombiecount, "chaos_icon_bearer_undivided", Player_GetStartPosition(g_Player8), 2);
end
Util_MissionTitle("They're coming... Get ready.")
Sound_Play("general_ping")
end
function LastStand_DemonRush()
g_demon_random = World_GetRand(1,100);
if (Player2_IsZombie == true and g_demon_random <= 15) then
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_cultist", Player_GetStartPosition(g_Player2), 20);
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_daemon_prince", Player_GetStartPosition(g_Player2), 1);
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_raptor", Player_GetStartPosition(g_Player2), 3);
Util_MissionTitle("An unholy presence blankets the battlefield...")
Sound_Play("general_ping")
elseif (Player2_IsZombie == true and g_demon_random <= 25) then
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_havoc_squad", Player_GetStartPosition(g_Player2), 2);
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_land_raider", Player_GetStartPosition(g_Player2), 1);
Util_MissionTitle("Scanners are picking up a large vehicle...")
Sound_Play("general_ping")
elseif (Player2_IsZombie == true and g_demon_random <= 50) then
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_marine_plague_squad", Player_GetStartPosition(g_Player2), 5);
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_great_unclean_one", Player_GetStartPosition(g_Player2), 1);
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_nurgle_champion", Player_GetStartPosition(g_Player2), 1);
Util_MissionTitle("The legions of Nurgle march once again...")
Sound_Play("general_ping")
elseif (Player2_IsZombie == true and g_demon_random <= 65) then
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_cultist", Player_GetStartPosition(g_Player2), 30);
Util_CreateSquadsAtPosition(g_Player3, "sg_zombie"..g_zombiecount, "chaos_squad_cultist", Player_GetStartPosition(g_Player3), 30);
Util_MissionTitle("A thousand cultists appear over the horizon...")
Sound_Play("general_ping")
elseif (Player2_IsZombie == true and g_demon_random <= 85) then
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_ahriman", Player_GetStartPosition(g_Player2), 1);
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_Lord_of_Change", Player_GetStartPosition(g_Player2), 1);
Util_MissionTitle("The Lord of Change has entered the battlefield...")
Sound_Play("general_ping")
elseif (Player2_IsZombie == true and g_demon_random <= 100) then
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_cultist", Player_GetStartPosition(g_Player2), 20);
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_bloodthirster", Player_GetStartPosition(g_Player2), 1);
Util_CreateSquadsAtPosition(g_Player2, "sg_zombie"..g_zombiecount, "chaos_squad_khorne_champion", Player_GetStartPosition(g_Player2), 1);
Util_MissionTitle("Khorne's finest begin their march...")
Sound_Play("general_ping")
end
end
Scar_AddInit(LastStand)