-
-
Notifications
You must be signed in to change notification settings - Fork 988
/
12_The_Final_Confrontation.cfg
1485 lines (1217 loc) · 34.6 KB
/
12_The_Final_Confrontation.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]
id=12_The_Final_Confrontation
name= _ "The Final Confrontation"
next_scenario=13_Epilogue
{UTBS_MAP 12_The_Final_Confrontation.map}
{STORY_THE_FINAL_CONFRONTATION}
{SCENARIO_MUSIC "the_deep_path.ogg"}
{EXTRA_SCENARIO_MUSIC "revelation.ogg"}
{EXTRA_SCENARIO_MUSIC "the_city_falls.ogg"}
victory_when_enemies_defeated=no
turns="-1"
{UNDERGROUND}
#########################################################################################################
# Events table (stuff that can be triggered with 'fire') #
#########################################################################################################
# eloh_death : causes the post-Eloh events to occur #
# create_minion : spawns one of Yechnagoth's minions #
# yechnagoth_regenerate : causes Yechnagoth to fully heal #
# yechnagoth_special_attack : trigger Yechnagoth's special slowing attack #
# yechnagoth_vulnerate : vulnerates Yechnagoth #
# yechnagoth_death : triggers Yechnagoth's death event #
#########################################################################################################
# Side 1: elves
[side]
side=1
id=Kaleh
type=Quenoth Youth
canrecruit=yes
gold=0
{NO_INCOME}
controller=human
shroud=no
fog=no
{FLAG_VARIANT long}
user_team_name= _ "team_name^Quenoth Elves"
[/side]
# Side 2: Eloh
[side]
side=2
no_leader=yes
gold=0
income=0
controller=ai
shroud=no
fog=no
team_name=eloh
user_team_name=_"Eloh"
{FLAG_VARIANT undead}
[ai]
aggression=0.95
caution=0.1
# change AI so that enemies target Kaleh's friends
# more than Kaleh himself. I want to threaten
# other units more, since Kaleh's death leads to
# immediate defeat
[goal]
name=target
[criteria]
id=Kaleh
[/criteria]
value=1
[/goal]
[goal]
name=target
[criteria]
id=Nym
[/criteria]
value=3
[/goal]
[goal]
name=target
[criteria]
id=Zhul
[/criteria]
value=3
[/goal]
[goal]
name=target
[criteria]
id=$ally_name
[/criteria]
value=3
[/goal]
[/ai]
[/side]
# Side 3: Brainwashed Elves
[side]
side=3
no_leader=yes
gold=0
income=0
controller=ai
shroud=no
fog=no
team_name=eloh
user_team_name=_"Eloh"
[ai]
aggression=0.95
caution=0.1
[goal]
name=target
[criteria]
id=Kaleh
[/criteria]
value=1
[/goal]
[goal]
name=target
[criteria]
id=Nym
[/criteria]
value=3
[/goal]
[goal]
name=target
[criteria]
id=Zhul
[/criteria]
value=3
[/goal]
[goal]
name=target
[criteria]
id=$ally_name
[/criteria]
value=3
[/goal]
[/ai]
{FLAG_VARIANT long}
[/side]
# Side 4: Pulsing Spires
[side]
side=4
no_leader=yes
gold=0
income=0
controller=ai
shroud=no
fog=no
team_name=eloh
user_team_name=_"Eloh"
{FLAG_VARIANT undead}
[ai]
aggression=-1.0
caution=1.0
[goal]
name=target
[criteria]
id=Kaleh
[/criteria]
value=1
[/goal]
[goal]
name=target
[criteria]
id=Nym
[/criteria]
value=3
[/goal]
[goal]
name=target
[criteria]
id=Zhul
[/criteria]
value=3
[/goal]
[goal]
name=target
[criteria]
id=$ally_name
[/criteria]
value=3
[/goal]
[/ai]
[/side]
# Prestart functions:
# insert items onto map
# place item images on map
# recall main heroes
# store/remove kaleh
# initialize starting variables
# set starting scenario objectives
[event]
name=prestart
# add items to map
{PLACE_IMAGE "items/kaleh-dead.png~NO_TOD_SHIFT()" 10 13}
# recall heroes
[recall]
id=Nym
x,y=10,16
[/recall]
[recall]
id=Zhul
x,y=11,17
[/recall]
# wmllint: unwho ALL
# recall dwarf/troll
[recall]
id=$ally_name
x,y=9,17
[/recall]
# wmllint: recognize Grog
# wmllint: recognize Nog
# wmllint: recognize Rogrimir
# wmllint: recognize Jarl
# store/remove kaleh
[store_unit]
[filter]
id=Kaleh
[/filter]
kill=yes
variable=stored_kaleh
[/store_unit]
#initialize starting variables
{VARIABLE allies_killed 0}
{VARIABLE ally_died_in_final_fight no}
{VARIABLE number_minions_to_spawn 0}
# set starting scenario objectives
[objectives]
summary= _ "Starting Objectives:"
[objective]
description= _ "Defeat the false Eloh"
condition=win
[/objective]
[objective]
description= _ "Death of Kaleh"
condition=lose
[/objective]
{IS_LAST_SCENARIO}
[/objectives]
[/event]
# Event 1: Starting dialogue
[event]
name=start
[scroll_to]
x,y=10,13
[/scroll_to]
[redraw]
[/redraw]
[delay]
time=750
[/delay]
[message]
speaker=Nym
message= _ "Kaleh! No!"
image=portraits/nym_moody.png
[/message]
[redraw]
[/redraw]
[delay]
time=500
[/delay]
# Nym runs to Kaleh's side
{MOVE_UNIT id=Nym 10 14}
[delay]
time=300
[/delay]
# Zhul runs to Kaleh's side
{MOVE_UNIT id=Zhul 11 14}
{MODIFY_UNIT (id=Zhul) facing nw}
[message]
speaker=Zhul
message= _ "He’s still breathing. Eloh, what grace I have, give unto him."
[/message]
[delay]
time=300
[/delay]
[message]
speaker=Nym
message= _ "He’s stirring."
[/message]
# Ally runs to Kaleh's side
{MOVE_UNIT id=$ally_name 9 14}
[delay]
time=300
[/delay]
[if]
[variable]
name=ally_race
equals=dwarf
[/variable]
[then]
[message]
speaker=$ally_name
message= _ "Aye, there’s still life in the boy. But where is the foul creature that did this to him?"
[/message]
[/then]
[else]
[message]
speaker=$ally_name
message= _ "The little one is not dead yet. But where is evil lady that did this to him?"
[/message]
[/else]
[/if]
[redraw]
[/redraw]
[delay]
time=300
[/delay]
[unit]
type=Divine Incarnation
id=Eloh
name= _ "Eloh"
profile=portraits/eloh.png
x,y=10,11
upkeep=free
side=2
[modifications]
{TRAIT_INTELLIGENT}
{TRAIT_QUICK}
[/modifications]
[/unit]
[delay]
time=500
[/delay]
[message]
speaker=Eloh
message= _ "So, the elf’s puny friends think they can save him. But you are too late. He is already mine!"
[/message]
[remove_item]
x,y=10,13
[/remove_item]
{VARIABLE_OP stored_kaleh.hitpoints sub 10}
{VARIABLE stored_kaleh.facing n}
[unstore_unit]
variable=stored_kaleh
find_vacant=yes
[/unstore_unit]
[if]
[have_unit]
id=$ally_name
[/have_unit]
[then]
{MESSAGE_DEPEND_ON_ALLY
(
[message]
speaker=Kaleh
message= _ "Nym, Zhul, Grog, you shouldn’t have."
[/message]
)
(
[message]
speaker=Kaleh
message= _ "Nym, Zhul, Nog, you shouldn’t have."
[/message]
)
(
[message]
speaker=Kaleh
message= _ "Nym, Zhul, Rogrimir, you shouldn’t have."
[/message]
)
(
[message]
speaker=Kaleh
message= _ "Nym, Zhul, Jarl, you shouldn’t have."
[/message]
)}
[/then]
[else]
[message]
speaker=Kaleh
message= _ "Nym, Zhul, you shouldn’t have."
[/message]
[/else]
[/if]
[message]
speaker=Eloh
message= _ "Your struggles were mildly entertaining, but futile in the end. For I am powerful beyond your imagining, and this is the seat of my power!"
[/message]
[message]
speaker=Zhul
message= _ "You are not Eloh. You are but a pitiful mockery of her power and glory!"
[/message]
[message]
speaker=Eloh
message= _ "Is that what you think? I shall prove you wrong. Look out upon your people and despair!"
[/message]
[move_unit_fake]
type=Quenoth Fighter
side=3
x=9,8
y=20,16
[/move_unit_fake]
[unit]
type=Quenoth Fighter
id=Anarion
name= _ "Anarion"
x=8
y=16
side=3
[modifications]
{TRAIT_QUICK}
{TRAIT_STRONG}
[/modifications]
[/unit]
[redraw]
[/redraw]
[delay]
time=100
[/delay]
[move_unit_fake]
type=Tauroch Rider
side=3
x=11,12
y=20,16
[/move_unit_fake]
[unit]
type=Tauroch Rider
id=Zylea
name= _ "Zylea"
x=12
y=16
side=3
[modifications]
{TRAIT_DEXTROUS}
{TRAIT_RESILIENT}
[/modifications]
[/unit]
[message]
speaker=Anarion
message= _ "All hail Eloh!"
[/message]
[message]
speaker=Zylea
message= _ "Death to the heretics!"
[/message]
[message]
speaker=Eloh
message= _ "They worship their true god."
[/message]
[message]
speaker=Eloh
message= _ "Come and bow down before your true master, boy."
[/message]
[message]
speaker=Kaleh
message= _ "Your wish is my command."
[/message]
[redraw]
[/redraw]
[delay]
time=300
[/delay]
# Kaleh moves over to Eloh
{MOVE_UNIT id=Kaleh 10 12}
[harm_unit]
[filter]
id=Eloh
[/filter]
[filter_second]
id=Kaleh
[/filter_second]
[primary_attack]
name=sword
[/primary_attack]
animate=yes
# Do damage according to Kaleh's first, sword attack
amount=$stored_kaleh.attack[0].damage
alignment=lawful
damage_type=blade
[/harm_unit]
{CLEAR_VARIABLE stored_kaleh}
[redraw]
[/redraw]
[delay]
time=500
[/delay]
[message]
speaker=Eloh
image=portraits/eloh_rage.png
message= _ "Argh, you stabbed me!"
[/message]
[message]
speaker=Kaleh
# wmllint: local spelling Kalehssar
message= _ "I have crossed deserts, mountains, and oceans and watched my people bleed every step of the way. I did not come all this way to give up now. I am tired of being called boy; I am Kalehssar, the leader of my people and I will fight you until my dying breath!"
[/message]
[message]
speaker=Eloh
image=portraits/eloh_rage.png
message= _ "I command you to stop this foolishness!"
[/message]
[message]
speaker=Kaleh
message= _ "Never!"
[/message]
[message]
speaker=Nym
message= _ "The shell brooches Melusand gave us, they’re glowing!"
[/message]
[message]
speaker=Kaleh
message= _ "You will never dominate us, not while hope survives!"
[/message]
[message]
speaker=Eloh
image=portraits/eloh_rage.png
message= _ "So be it. You choose death? Then you shall receive it from those you hold most dear. Kill the unbelievers, let none survive!"
[/message]
[message]
speaker=Anarion
message= _ "Yes mistress."
[/message]
[message]
speaker=Kaleh
message= _ "Ignore our brethren, we must destroy her!"
[/message]
[/event]
# Create an alien minion
[event]
name=create_minion
first_time_only=no
{SCATTER_UNITS 1 (Crawling Horror) 0 (
x=6-14
y=7-14
terrain=Rr,Uu
[not]
[filter]
[/filter]
[/not]
) (
side=2
upkeep=free
)}
[/event]
# Event 1: The Death of Eloh and the revealing of the true monster
[event]
name=last breath
[filter]
id=Eloh
[/filter]
[fire_event]
name=eloh_death
[/fire_event]
[/event]
[event]
name=eloh_death
[message]
speaker=Eloh
image=portraits/eloh_rage.png
message= _ "You think you killed me? You have no idea what you are facing."
[/message]
[message]
speaker=Nym
message= _ "Who is she really? Could it be Zhangor, back to avenge his imprisonment?"
image=portraits/nym_moody.png
[/message]
[message]
speaker=Eloh
image=portraits/eloh_rage.png
message= _ "Nonsense. Unlike that fool, I do not care about petty things like revenge. Nor do I depend on mortals to enact my will. No, I shall destroy you myself!"
[/message]
[kill]
id=Eloh
animate=no
fire_event=no
[/kill]
[modify_unit]
[filter]
side=3
[/filter]
side=1
[/modify_unit]
[message]
type=Quenoth Fighter, Tauroch Rider
message= _ "Huh? What happened?"
[/message]
[message]
speaker=Zhul
message= _ "Her spell has been broken. But I don’t think we have won yet. Come aid us!"
[/message]
[message]
type=Quenoth Fighter, Tauroch Rider
message= _ "Yes priestess."
[/message]
[scroll]
x=25
[/scroll]
[scroll]
x=-25
[/scroll]
[scroll]
x=25
[/scroll]
[scroll]
x=-25
[/scroll]
[scroll]
x=25
[/scroll]
[scroll]
x=-25
[/scroll]
[redraw]
[/redraw]
[delay]
time=400
[/delay]
[color_adjust]
red,green,blue=40,0,100
[/color_adjust]
[redraw]
[/redraw]
[delay]
time=250
[/delay]
[color_adjust]
red,green,blue=0,0,0
[/color_adjust]
[redraw]
[/redraw]
# main body appears
[terrain]
terrain=Urb # wmllint: ignore
x,y=10,10
[/terrain]
# create main body unit here
[unit]
type=Central Body
id=Yechnagoth
name= _ "Yechnagoth"
side=2
x,y=10,10
[/unit]
# add roots around central body
#{PLACE_IMAGE scenery/castle-ruins.png 9 11}
#{PLACE_IMAGE scenery/castle-ruins.png 10 11}
#{PLACE_IMAGE scenery/castle-ruins.png 11 11}
#{PLACE_IMAGE scenery/castle-ruins.png 9 10}
#{PLACE_IMAGE scenery/castle-ruins.png 10 9}
#{PLACE_IMAGE scenery/castle-ruins.png 11 10}
# Pulsing Spires appear
{RANDOM 0..1}
[if]
[variable]
name=random
numerical_equals=1
[/variable]
[then]
[terrain]
terrain=Uu
x=8,8,14
y=7,13,10
[/terrain]
# create Pulsing Spires at:
# (8,7) (8,13) (14,10)
[unit]
type=Pulsing Spire
side=4
x,y=8,7
[/unit]
[unit]
type=Pulsing Spire
side=4
x,y=8,13
[/unit]
[unit]
type=Pulsing Spire
side=4
x,y=14,10
[/unit]
[/then]
[else]
[terrain]
terrain=Uu
x=6,12,12
y=10,7,13
[/terrain]
# create Pulsing Spires at:
# (6,10) (12,7) (12,13)
[unit]
type=Pulsing Spire
side=4
x,y=6,10
[/unit]
[unit]
type=Pulsing Spire
side=4
x,y=12,7
[/unit]
[unit]
type=Pulsing Spire
side=4
x,y=12,13
[/unit]
[/else]
[/if]
[redraw]
[/redraw]
[message]
speaker=Nym
message= _ "What is that thing?!"
image=portraits/nym_moody.png
[/message]
[message]
speaker=Zhul
message= _ "Eloh protect us!"
[/message]
[color_adjust]
red,green,blue=33,181,140
[/color_adjust]
[redraw]
[/redraw]
[delay]
time=250
[/delay]
[color_adjust]
red,green,blue=0,0,0
[/color_adjust]
[redraw]
[/redraw]
# create 3 bugs
[fire_event]
name=create_minion
[/fire_event]
[fire_event]
name=create_minion
[/fire_event]
[fire_event]
name=create_minion
[/fire_event]
[redraw]
[/redraw]
[delay]
time=500
[/delay]
[message]
speaker=Zhul
message= _ "Curse Uria, more abominations!"
[/message]
[message]
speaker=Nym
message= _ "Is it even possible to kill this thing? It’s huge!"
image=portraits/nym_moody.png
[/message]
[message]
speaker=Kaleh
message= _ "It must have some sort of weak point. Look at those pulsing spires, I thought they were stone, but they seem to be alive. Maybe if we destroy them it will weaken the creature. No matter what horrors appear, we must keep attacking it. We can’t stop now!"
[/message]
[objectives]
summary= _ "New Objectives:"
[objective]
description= _ "Defeat Yechnagoth"
condition=win
[/objective]
[objective]
description= _ "Death of Kaleh"
condition=lose
[/objective]
{IS_LAST_SCENARIO}
[/objectives]
# Start spawning minions, increasing the number each turn.
{VARIABLE number_minions_to_spawn 1}
[event]
name="turn $($turn_number+{ON_DIFFICULTY 2 2 1})"
delayed_variable_substitution=no
{VARIABLE number_minions_to_spawn 2}
[/event]
[event]
name="turn $($turn_number+{ON_DIFFICULTY 4 3 3})"
delayed_variable_substitution=no
{VARIABLE number_minions_to_spawn 3}
[/event]
[event]
name="turn $($turn_number+{ON_DIFFICULTY 6 5 5})"
delayed_variable_substitution=no
{VARIABLE number_minions_to_spawn 4}
[/event]
[/event]
[event]
name=new turn
first_time_only=no
[filter_condition]
[have_unit]
id=Yechnagoth
[/have_unit]
[/filter_condition]
{VARIABLE helper_level 4}
[while]
[variable]
name=helper_level
greater_than=0
[/variable]
[variable]
name=possible_helpers.length
equals=0
[/variable]
[do]
[store_unit]
[filter]
side=1
level=$helper_level
x,y=recall,recall
[/filter]
kill=no
variable=possible_helpers
[/store_unit]
{VARIABLE_OP helper_level sub 1}
[/do]
[/while]
{CLEAR_VARIABLE helper_level}
[if]
[variable]
name=possible_helpers.length
greater_than=0
[/variable]
[then]
{VARIABLE_OP random_helper_i rand "1..$possible_helpers.length"}
{VARIABLE_OP random_helper_i sub 1}
[move_unit_fake]
type=$possible_helpers[$random_helper_i].type
side=1
x=10,10
y=20,18
[/move_unit_fake]
[recall]
id=$possible_helpers[$random_helper_i].id
x,y=10,18
show=no
[/recall]
{CLEAR_VARIABLE random_helper_i}
[/then]
[/if]
{CLEAR_VARIABLE possible_helpers}
[/event]
# Event 2: New minions are created each turn