-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
03_Stirring_in_the_Night.cfg
2213 lines (2082 loc) · 77.2 KB
/
03_Stirring_in_the_Night.cfg
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
#textdomain wesnoth-utbs
# Scenario should work under following assumptions:
# -- Player finds himself on the battlefield between feuding undead.
# -- Undead deploy champions (one each).
# -- Number of tents saved from destruction affects unit cost later in campaign
# -- Character Garak is removed from campaign at this stage.
# -- There is an orc raid in second half.
# -- There is no timeflow, scenario takes place at night.
[scenario]
id=03_Stirring_in_the_Night
next_scenario=04_Descending_into_Darkness
name= _ "A Stirring in the Night"
{UTBS_MAP 03_A_Stirring_in_the_Night.map}
{LONGDARK4}
[+time]
# po: Use the same translation as for the string in the wesnoth-help textdomain.
name= _ "The Long Dark"
[/time]
# Set initial turns to 12 to give impression that that is how long player needs to
# survive.
turns=12
victory_when_enemies_defeated=no
{INTRO_AND_SCENARIO_MUSIC "transience.ogg" "the_deep_path.ogg"}
{EXTRA_SCENARIO_MUSIC "frantic.ogg"}
{EXTRA_SCENARIO_MUSIC "the_king_is_dead.ogg"}
{EXTRA_SCENARIO_MUSIC "siege_of_laurelmor.ogg"}
{STORY_STIRRING_IN_THE_NIGHT}
# Side 1 elves
[side]
side=1
id=Kaleh
type=Quenoth Youth
canrecruit=yes
controller=human
recruit=Quenoth Fighter,Tauroch Rider,Quenoth Scout,Quenoth Mystic
gold=200
{INCOME 4 2 0}
{FLAG_VARIANT long}
user_team_name= _ "team_name^Quenoth Elves"
[/side]
# Side 2 undead, starts with pet revenant, Zur
[side]
side=2
id=Azkotep
name= _ "Azkotep"
type=Lich
canrecruit=yes
controller=ai
{GOLD 125 150 175}
{INCOME 15 18 21}
#ifdef HARD
recruit=Deathblade,Revenant,Bone Shooter,Skeleton Rider
#else
recruit=Skeleton,Skeleton Archer,Skeleton Rider
#endif
[ai]
{AI_SIMPLE_ALWAYS_ASPECT aggression 0.9}
{AI_SIMPLE_ALWAYS_ASPECT caution 0.0}
{AI_SIMPLE_ALWAYS_ASPECT passive_leader yes}
{AI_SIMPLE_ALWAYS_ASPECT village_value 0}
{AI_SIMPLE_ALWAYS_ASPECT scout_village_targeting 0}
{AI_NO_SCOUTS}
#!-- Do not target sides 1 and 4, thay are an annoyance not an enemy
#!-- Unless on HARD of course, death to the living
[goal]
value=10
[criteria]
side=3
[/criteria]
[/goal]
[goal]
value=20
[criteria]
id=Grak
[/criteria]
[/goal]
#ifdef HARD
[goal]
value=5
[criteria]
side=1
[/criteria]
[/goal]
[goal]
value=5
[criteria]
side=4
[/criteria]
[/goal]
#endif
[/ai]
{FLAG_VARIANT undead}
[/side]
# Side 3 undead, starts with pet wraith, Grak
[side]
side=3
id=Ystara
name= _ "Ystara"
type=Death Knight
canrecruit=yes
controller=ai
{GOLD 125 150 175}
{INCOME 15 18 21}
#ifdef HARD
recruit=Blood Bat,Necrophage,Wraith,Soulless
#else
recruit=Vampire Bat,Ghoul,Ghost,Walking Corpse
#endif
[ai]
{AI_SIMPLE_ALWAYS_ASPECT aggression 0.9}
{AI_SIMPLE_ALWAYS_ASPECT caution 0.0}
{AI_SIMPLE_ALWAYS_ASPECT passive_leader yes}
{AI_SIMPLE_ALWAYS_ASPECT village_value 0}
{AI_SIMPLE_ALWAYS_ASPECT scout_village_targeting 0}
{AI_NO_SCOUTS}
[goal]
value=10
[criteria]
side=2
[/criteria]
[/goal]
[goal]
value=20
[criteria]
id=Zur
[/criteria]
[/goal]
#ifdef HARD
[goal]
value=5
[criteria]
side=1
[/criteria]
[/goal]
[goal]
value=5
[criteria]
side=4
[/criteria]
[/goal]
#endif
[/ai]
{FLAG_VARIANT undead}
[/side]
# Side 4, Orcish Raiders
# Raider shouldn’t usually capture the elves' keep, but if they do, they can
# summon more units.
[side]
side=4
no_leader=yes
controller=ai
recruit=Orcish Grunt, Orcish Archer, Goblin Spearman, Orcish Assassin
shroud=no
fog=no
[ai]
{AI_SIMPLE_ALWAYS_ASPECT aggression 1.0}
{AI_SIMPLE_ALWAYS_ASPECT caution 0.0}
{AI_SIMPLE_ALWAYS_ASPECT scout_village_targeting 0}
{AI_SIMPLE_ALWAYS_ASPECT village_value 0}
[/ai]
{FLAG_VARIANT6 ragged}
[/side]
{STARTING_VILLAGES 1 30}
#define VILLAGE_CONTROL_OBJECTIVE
[objective]
description= _ "You lose control (even temporarily) of more than 6 villages"
condition=lose
[/objective]
#enddef
#define DEFEAT_AZKOTEP_OBJECTIVE
[objective]
description= _ "Defeat Azkotep"
condition=win
[/objective]
#enddef
#define DEFEAT_YSTARA_OBJECTIVE
[objective]
description= _ "Defeat Ystara"
condition=win
[/objective]
#enddef
#define HERO_DEATH_OBJECTIVE
[objective]
description= _ "Death of Kaleh"
condition=lose
[/objective]
[objective]
description= _ "Death of Nym"
condition=lose
[/objective]
[objective]
description= _ "Death of Zhul"
condition=lose
[/objective]
#enddef
#! -- setting up objectives,variables and map objects sets
#! -- variables : $ambush_turn, $sneak_up, $elven_camps,
#! -- $killed_by_azkotep, $killed_by_ystara, $grak_defeated,
#! -- $zur_defeated
[event]
name=prestart
# set starting scenario objectives
[objectives]
summary= _ "Starting Objectives:"
[objective]
description= _ "Survive until dawn"
condition=win
show_turn_counter=yes
[/objective]
[objective]
{ALTERNATIVE_OBJECTIVE_CAPTION}
description= _ "Defeat all undead leaders"
condition=win
[/objective]
{VILLAGE_CONTROL_OBJECTIVE}
[objective]
description= _ "Death of Kaleh"
condition=lose
[/objective]
[objective]
description= _ "Death of Nym"
condition=lose
[/objective]
[objective]
description= _ "Death of Garak"
condition=lose
[/objective]
[objective]
description= _ "Death of Zhul"
condition=lose
[/objective]
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
#recall heroes
[recall]
id=Nym
[/recall]
[recall]
id=Elyssa
[/recall]
[recall]
id=Zhul
[/recall]
[recall]
id=Garak
[/recall]
[recall]
id=Dust Devil
[/recall]
[item]
x=14
y=10
halo=halo/fire-aura.png
[/item]
[item]
x=16
y=15
halo=halo/fire-aura.png
[/item]
[item]
x=13
y=20
halo=halo/fire-aura.png
[/item]
{VARIABLE sneak_up 0}
{VARIABLE killed_by_azkotep 0}
{VARIABLE killed_by_ystara 0}
{VARIABLE grak_defeated 0}
{VARIABLE zur_defeated 0}
{VARIABLE defiant_death 0}
# Time Areas correspond with halos around campfires
[time_area]
x=14,16,13
y=10,15,20
id=campfires
radius=2
{DAWN}
[+time]
# po: Use the same translation as for the string in the wesnoth-help textdomain.
name= _ "The Long Dark"
image=misc/time-schedules/after-the-fall/15longdark4.png~BLIT(misc/tod-bright.png)
[/time]
[/time_area]
[/event]
# Start of scenario event. It sets up
# initial undead units and plays intro dialogue
[event]
name=start
#ifdef EASY
{NAMED_NOTRAIT_UNIT 2 (Revenant) 20 22 (Zur) ( _ "Zur") }
{NAMED_NOTRAIT_UNIT 3 (Wraith) 22 7 (Grak) ( _ "Grak")}
# On medium and hard change champions type to more menacing
# and give them some help
#else
{NOTRAIT_UNIT 2 (Skeleton Rider) 20 23}
{NOTRAIT_UNIT 2 (Skeleton Rider) 21 23}
{NOTRAIT_UNIT 3 (Necrophage) 22 6}
{NOTRAIT_UNIT 3 (Necrophage) 23 7}
#endif
#ifdef NORMAL
{NAMED_NOTRAIT_UNIT 2 (Deathblade) 20 22 (Zur) (_"Zur") }
{NAMED_NOTRAIT_UNIT 3 (Wraith) 22 7 (Grak) (_"Grak")}
#endif
#ifdef HARD
{NAMED_NOTRAIT_UNIT 2 (Draug) 20 22 (Zur) (_"Zur") }
{NAMED_NOTRAIT_UNIT 3 (Spectre) 22 7 (Grak) (_"Grak")}
#endif
# give the champs an icon so they stand out, but make it gray since they are not loyal
[modify_unit]
[filter]
id=Grak,Zur
[/filter]
overlays=misc/loyal-icon.png~GS()
[/modify_unit]
[message]
speaker=Nym
message= _ "Kaleh, wake up! Sentries report movement in the sands!"
[/message]
[message]
speaker=Kaleh
message= _ "Orcs?"
[/message]
[message]
speaker=Nym
message= _ "I don’t..."
[/message]
[message]
speaker=Azkotep
message= _ "We meet again, Ystara."
[/message]
[message]
speaker=Ystara
message= _ "You think you can take me, Azkotep?"
[/message]
[message]
speaker=Azkotep
message= _ "My champion, Zur shall slice you to shreds like the puny adept you once were."
[/message]
[message]
speaker=Ystara
message= _ "You always were an arrogant little bastard. Grak will swallow your soul, or what’s left of it."
[/message]
[message]
speaker=Azkotep
message= _ "You spurned me once and I will make you pay. To battle, my minions! Become my wrath!"
[/message]
[message]
speaker=Nym
message= _ "... think so. You really know how to pick a campsite, Kaleh."
[/message]
[message]
speaker=Kaleh
message= _ "Where did they come from? I swear those castles weren’t there at sunset."
[/message]
[message]
speaker=Zhul
message= _ "Many strange things can happen during the long dark. But despite their wraith-like forms, I have no doubt that their cold steel can still bite flesh."
[/message]
[message]
speaker=Elyssa
message= _ "Like I haven’t killed enough undead recently. Why can’t these guys just stay dead?"
[/message]
[message]
speaker=Garak
message= _ "Our encampment is out of the direct line of attack, so we should be somewhat safe, at least."
[/message]
[message]
speaker=Zhul
message= _ "But if the battle spills around our people will be slaughtered by the undead hordes!"
[/message]
[message]
speaker=Kaleh
message= _ "There’s no way we can escape the battle in time. We must protect the camp from the undead."
[/message]
[message]
speaker=Zhul
message= _ "I fear that if we lose more than half of the tents we will not have the strength to go on. Garak, wake your men. We must hold off the undead until dawn."
[/message]
[message]
speaker=Kaleh
message= _ "To arms my people, to arms!"
[/message]
[/event]
# At the end of the initial dialogue Kaleh raises a war cry,
# some elves will wake up and respond
# Recall a random number of troops among the tents to make the
# glorious victory achieveable on harder levels.
# Internal variables: $tents, $rally_chance, $i
[event]
name=turn 1
[store_villages]
variable=tents
[/store_villages]
{VARIABLE rally_chance {ON_DIFFICULTY 70 50 30}}
[foreach]
array=tents
[do]
{RANDOM 0..100}
{VARIABLE_OP random sub $this_item.y}
[if]
[variable]
name=random
less_than=$rally_chance
[/variable]
[then]
[recall]
side=1
x=$this_item.x
y=$this_item.y
[/recall]
{VARIABLE_OP rally_chance sub 3}
[/then]
[/if]
[/do]
[/foreach]
{CLEAR_VARIABLE tents}
{CLEAR_VARIABLE rally_chance}
# depending on what units rally, and where, player can lose a village to the north champion purely to RNG, this scout can block that without being too wonderful otherwise
#ifndef HARD
[recall]
type=Quenoth Scout
x,y=16,14
facing=se
[/recall]
[if]
[have_unit]
x,y=16,14
[/have_unit]
[else]
[unit]
type=Quenoth Scout
side=1
x,y=16,14
facing=se
[/unit]
[/else]
[/if]
#endif
[/event]
# The first capture of an elven_camp has some speech
[event]
name=capture
first_time_only=yes
[filter]
side=2,3
[/filter]
[message]
speaker=Nym
message= _ "They’re raising the corpses of our fallen! What a horrible fate!"
image=portraits/nym_moody.png
[/message]
[message]
speaker=Elyssa
message= _ "Then we shall have to give them a proper cremation."
[/message]
[/event]
# Count destroyed tents, each lost makes future scenarios harder
# Includes defeat by loss of tents
# Affects variables : $elven_camps
# Each tent lost to undead spawns a WC
[event]
name=prestart
[store_villages]
variable=camps
[/store_villages]
# give player villages to protect
{VARIABLE elven_camps $camps.length}
#This generates and stores an event for every camp.
#That way we can avoid to store information about each village
#by using the first_time_only feature.
[foreach]
array=camps
[do]
[set_variables]
name=camp_event
mode=replace
[value]
name=capture
first_time_only=yes
[filter]
side=2,3,4
x=$this_item.x
y=$this_item.y
[/filter]
[if]
[variable]
name=unit.side
equals=2
[/variable]
[or]
[variable]
name=unit.side
equals=3
[/variable]
[/or]
[then]
#ifdef HARD
{NOTRAIT_UNIT $|unit.side (Soulless) $|x1 $|y1}
#endif
#ifdef NORMAL
{RANDOM (Walking Corpse,Soulless)}
{NOTRAIT_UNIT $|unit.side $|random $|x1 $|y1}
#endif
#ifdef EASY
{NOTRAIT_UNIT $|unit.side (Walking Corpse) $|x1 $|y1}
#endif
[/then]
[/if]
[gold]
amount={ON_DIFFICULTY 10 20 30}
side=$|unit.side
[/gold]
{VARIABLE_OP elven_camps sub 1}
[if]
[variable]
name=elven_camps
equals=5
[/variable]
[then]
[message]
speaker=Kaleh
message= _ "Too many of our people have been killed. We will surely be overwhelmed by the undead now. All is lost!"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/then]
[/if]
[/value]
[/set_variables]
[insert_tag]
name=event
variable=camp_event
[/insert_tag]
[/do]
[/foreach]
{CLEAR_VARIABLE camps}
{CLEAR_VARIABLE camp_event}
[/event]
# Instead with providing AI with higher lvl units on medium
# and hard give it highly experienced lvl1's
#ifdef NORMAL
# Change the difficulty increase model from having computer
# recruit some lvl2 and 3 units outright to advancing or
# half-advancing recruited lvl 1. At the same time, guarantees
# broader spectrum of opposing units, as AI advancement is random.
# Internal variables : $factor
# TODO: Should this happen on HARD too (would need to change recruit list to match)
[event]
name=recruit
first_time_only=no
[filter]
side=2,3,4
[/filter]
{VARIABLE factor $unit.max_experience}
{VARIABLE_OP factor multiply 0.5}
{VARIABLE_OP factor round 0}
{RANDOM $factor..$unit.max_experience}
{VARIABLE unit.experience $random}
[unstore_unit]
variable=unit
[/unstore_unit]
{CLEAR_VARIABLE factor}
[/event]
#endif
# If opposing champion wasn't attacked by the player yet Garak
# can issue a challenge. Sffects variables : $grak_defeated,
# $zur_defeated
# Inform the player about the possibility of challenge and
# adjust Garak accordingly. Perform the challenge, set the
# death events where required. Internal variables :
# $garak_x, $garak_y, $challenged
[event]
name=turn 2
[message]
speaker=Garak
message=_"These champions... I will challenge them. Zhul, bless my weapons with light of Eloh."
[/message]
[message]
speaker=Zhul
message=_"Garak, but the suns..."
[/message]
[message]
speaker=Kaleh
message=_"You will not do any such thing, anyone trying to fight these creeps singlehanded will surely die. We need you, we will not make it without you."
[/message]
[message]
speaker=Garak
message=_"I had dreams this night Kaleh, full of gloom and darkness, my journey will end here one way or another."
[/message]
[message]
speaker=Kaleh
message=_"No! That’s not true, our future is what we make of it, stay behind for this fight and..."
[/message]
[message]
speaker=Garak
message=_"And what? You’ll help me become a coward? I lived long, I’m not afraid of the end, just let me give it some meaning."
[/message]
[message]
speaker=Zhul
message=_"I bless you with the light that will come, I bless you with the memory and the promise. Lay down your shield, champion, and let your blade shine in the dark."
[/message]
[object]
id=Garak_vow
silent=yes
[filter]
id=Garak
[/filter]
[effect]
apply_to=remove_attacks
range=ranged
[/effect]
[effect]
apply_to=new_ability
[abilities]
{ABILITY_STEADFAST}
[/abilities]
[/effect]
#textdomain wesnoth-help
[effect]
apply_to=attack
range=melee
[set_specials]
[berserk]
id=berserk
name= _ "righteous rage"
name_inactive=""
description= _ "Whether used offensively or defensively, this attack presses the engagement until one of the champions is slain, or 30 rounds of attacks have occurred."
value=30
[filter_opponent]
id=Grak,Zur
[/filter_opponent]
[/berserk]
#ifndef HARD
[chance_to_hit]
id=magical
name= _ "true strike"
name_inactive=""
description= _ "This attack always has a 70% chance to hit regardless of the defensive ability of the champion being attacked."
value=70
cumulative=no
[filter_opponent]
id=Grak,Zur
[/filter_opponent]
[/chance_to_hit]
#endif
mode=append
[/set_specials]
[/effect]
#textdomain wesnoth-utbs
[effect]
apply_to=attack
range=melee
# the type=blade is needed in case Garak picked up the holy
# water in the second scenario - in that case he gets to keep it
type=blade
set_type=fire
[/effect]
[/object]
[/event]
[event]
name=attack
first_time_only=no
[filter]
id=Garak,Grak,Zur
[/filter]
[filter_second]
id=Garak,Grak,Zur
[/filter_second]
# Identify who was challenged
# could be none if Zur fights Grak
[if]
[variable]
name=unit.id
equals=Garak
[/variable]
[then]
{VARIABLE challenged $second_unit.id}
[/then]
[else]
[if]
[variable]
name=second_unit.id
equals=Garak
[/variable]
[then]
{VARIABLE challenged $unit.id}
[/then]
[/if]
[/else]
[/if]
# if Zur or Grak is challenged, display appropriate dialog
[if]
[variable]
name=challenged
equals=Grak
[/variable]
[then]
[message]
speaker=Garak
message=_"You there! Creep! Stand and face me, shade! I challenge you!"
[/message]
[if]
[variable]
name=zur_defeated
equals=0
[/variable]
[then]
[message]
speaker=Grak
message=_"Foolish mortal... For daring to challenge me, I’ll devour your soul and torment it for all eternity..."
[/message]
[/then]
[else]
[message]
speaker=Grak
message=_"So you destroyed Zur... Come mortal, let’s cross our blades... It’s time for you to take his place..."
[/message]
[/else]
[/if]
[event]
name=die
[filter]
id=Grak
[/filter]
{VARIABLE grak_defeated 1}
[/event]
[/then]
[else]
[if]
[variable]
name=challenged
equals=Zur
[/variable]
[then]
[message]
speaker=Garak
message=_"You there! Pile of bones! I challenge you, stand and face me!"
[/message]
[if]
[variable]
name=grak_defeated
equals=0
[/variable]
[then]
[message]
speaker=Zur
message=_"Puny elf... Time to die..."
[/message]
[/then]
[else]
[message]
speaker=Zur
message=_"Grak was weak... But still you deserve respect... Meet my axe and take his place..."
[/message]
[/else]
[/if]
[event]
name=die
[filter]
id=Zur
[/filter]
{VARIABLE zur_defeated 1}
[/event]
[/then]
[/if]
[/else]
[/if]
{CLEAR_VARIABLE challenged}
[/event]
[event]
name=die
[filter]
id=Garak
[/filter]
[filter_second]
id=Grak,Zur
[/filter_second]
[message]
speaker=$second_unit.id
message=_"And so it ends... Your champion is dead, elves... Come join him..."
[/message]
[/event]
[event]
name=die
[filter]
id=Garak
[/filter]
[filter_second]
[not]
id=Grak,Zur
[/not]
[/filter_second]
[message]
speaker=Kaleh
message=_"Where is Garak? Has anybody seen him?"
[/message]
[message]
speaker=Zhul
message=_"I saw him jumping into deep darkness pursuing a group of enemies. Let’s hope nothing happened to him."
[/message]
[/event]
# If challenge didn't happen by turn 12 and bad guy dies, Garak
# gets possessed. Sets variable : $ElvishGarak, $defiant_death
# Depends on variables : $grak_defeated, $zur_defeated,
# $azkotep_casualties[], $ystara_casualties[],
# $killed_by_azkotep, $killed_by_ystara clears variables :
# $azkotep_casualties[], $ystara_casualties[],
# $killed_by_azkotep, $killed_by_ystara
# Turn 12
# -- The sun should rise, it won't need dialogue
# --If both bad guys alive -> kill Garak -> replace with zombie
# If champion not killed in a duel else just kill
# --If one alive && his champion not killed in a duel ->
# kill Garak, place fallen one -> else just kill
# --If both died it will not be invoked
# Internal variables : $choice_flag, $i
[event]
name=turn 12
{VARIABLE choice_flag 0}
[if]
[have_unit]
id=Azkotep
[/have_unit]
[then]
{VARIABLE_OP choice_flag add 1000}
[/then]
[/if]
[if]
[have_unit]
id=Ystara
[/have_unit]
[then]
{VARIABLE_OP choice_flag add 100}
[/then]
[/if]
{VARIABLE_OP grak_defeated multiply 10}
{VARIABLE_OP choice_flag add $grak_defeated}
{VARIABLE_OP grak_defeated divide 10}
{VARIABLE_OP choice_flag add $zur_defeated}
[message]
speaker=Nym
message= _"Look, dawn is nigh, our salvation is almost at hand. Even the long dark can’t last forever, and with the light of the sun the undead power wanes and their dark magics unravel."
[/message]
# Garak will die - store him for resurrection dialogs.
[store_unit]
[filter]
id=Garak
[/filter]
variable=ElvishGarak
kill=no
[/store_unit]
[if]
[variable]
name=choice_flag
equals=1111
[/variable]
[then]
[message]
speaker=Ystara
message= _ "No! This contest is not over yet, Azkotep. I shall show you a taste of my true power."
[/message]
[kill]
id=Ystara
animate=yes
fire_event=no
[/kill]
[kill]
id=Garak
animate=yes
fire_event=no
[/kill]
{NAMED_NOTRAIT_UNIT 2 (Corrupted Quenoth Elf) $ElvishGarak.x $ElvishGarak.y (Possessed Garak) ( _ "Possessed Garak")}
[fire_event]
name=garak_resists
[/fire_event]
[message]
speaker=Azkotep
message= _"No! How dare you? I shall have my vengeance upon you for spoiling this contest! Darkness shall reign until I have triumphed!"
[/message]
[message]
speaker=Nym
message= _ "Maybe I spoke too soon. Curse Uria, he has even blotted out the stars, all is darkness. Kaleh, our course is clear, we must destroy that abomination."
image=portraits/nym_moody.png
[/message]
[objectives]
summary= _ "New Objectives:"
silent=no
{DEFEAT_AZKOTEP_OBJECTIVE}
{VILLAGE_CONTROL_OBJECTIVE}
{HERO_DEATH_OBJECTIVE}
[gold_carryover]
carryover_percentage=40
[/gold_carryover]
[/objectives]
{VARIABLE defiant_death 1}
[/then]
[/if]
[if]
[variable]
name=choice_flag
equals=1110
[/variable]
[then]
[message]
speaker=Azkotep
message= _ "No, I shall have my revenge. I shall show you that darkness is strongest just before dawn. Death and decay, grant me my vengeance!"
[/message]
[message]
speaker=Ystara
message= _ "In this I shall support you, the darkness will not lift until one of us is victorious."
[/message]
[kill]
id=Azkotep