-
-
Notifications
You must be signed in to change notification settings - Fork 990
/
12_Endless_Night.cfg
1566 lines (1374 loc) · 64.6 KB
/
12_Endless_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-did
[scenario]
id=12_Endless_Night
name= _ "Endless Night"
map_data="{campaigns/Descent_Into_Darkness/maps/12_Endless_Night.map}"
turns=unlimited
next_scenario=12_Endless_Night
victory_when_enemies_defeated=yes
{UNDERGROUND}
[time_area]
x=27-31,26,21-25
y=0-5,2-4,0-2
{DEFAULT_SCHEDULE}
[/time_area]
[story]
[part]
music=transience.ogg
story= _ "Years pass. Every summer, by the time the mountainous paths and high passes shed their wintry gowns of snow, the lich sends his soldiers to attack the orcs, removing all human, elven, and dwarven patrols that impede them. Every year, the undead inflict some damage before being repelled."
{STORYTXT_BACKGROUND end.jpg}
[/part]
# a bit of extra text for the first round
[if]
{VARIABLE_CONDITIONAL timesForever numerical_equals 0}
[then]
[part]
story= _ "The lich sometimes wonders if his endeavors are naught but a fruitless crusade, but then again, so what? Life, unlife, death... nothing has ever given his existence meaning. And yet, he still persists on? For what?"
{STORYTXT_BACKGROUND end.jpg}
[/part]
[part]
story= _ "<i>Reason and purpose...</i>"
{STORYTXT_BACKGROUND end.jpg}
[/part]
[part]
story= _ "He needs none. Philosophy only begets misery. Violence and savagery have been the essence of his existence, the forces that once controlled his life, the ones unrelinquished in undeath. Better to simply kill without deliberation, for what use is there to dwell on any alternative? He has never been one for regrets."
{STORYTXT_BACKGROUND end.jpg}
[/part]
[/then]
[/if]
# These if statements are before the prestart event, so are off-by-one compared to the other checks of timesForever
[if]
{VARIABLE_CONDITIONAL timesForever numerical_equals 1}
[then]
[part]
story= _ "Mal Keshar continues to study the book and re-reads the final entry."
{STORYTXT_BACKGROUND end.jpg}
[/part]
[part]
# po: This text comes from the epilogue of Secrets of the Ancients, edited to avoid revealing the name of the campaign or the names of the protagonists
story = _"<i>“We prevailed today on the field, but our victory did not please me. I realize now... the world is not ready for our knowledge. They cannot understand that we have conquered that primordial fear: death. Instead, as they look upon us, judgment of our appearance drives them to ignorant terror. I give up on all of them. [...] In some future time, less conservative attitudes may dominate, and our knowledge can be put to good use. I can certainly afford to wait. In the meantime, we are doing what we can to hasten that day.”</i>"
{STORYTXT_BACKGROUND book.jpg}
[/part]
[part]
# po: More text from the epilogue of Secrets of the Ancients
story= _ "<i>“As for me, I will make my journal conspicuous on this battlefield. I suspect that most will fear it enough to try to destroy it, but I have placed several wards on my journal to protect it. This way, it should survive long enough to make its way into the hands of someone more open-minded. Tath, in particular, is home to many mages. It only takes one who is willing to learn...”</i>"
{STORYTXT_BACKGROUND book.jpg}
[/part]
[/then]
[/if]
[if]
{VARIABLE_CONDITIONAL timesForever numerical_equals 2}
[then]
[part]
# po: This text comes from the epilogue of Secrets of the Ancients, edited to avoid revealing the name of the campaign or the names of the protagonists
story = _"<i>“We prevailed today on the field, but our victory did not please me. I realize now... the world is not ready for our knowledge. They cannot understand that we have conquered that primordial fear: death. Instead, as they look upon us, judgment of our appearance drives them to ignorant terror. I give up on all of them. [...] In some future time, less conservative attitudes may dominate, and our knowledge can be put to good use. I can certainly afford to wait. In the meantime, we are doing what we can to hasten that day.”</i>"
{STORYTXT_BACKGROUND book.jpg}
[/part]
[part]
# po: More text from the epilogue of Secrets of the Ancients
story= _ "<i>“As for me, I will make my journal conspicuous on this battlefield. I suspect that most will fear it enough to try to destroy it, but I have placed several wards on my journal to protect it. This way, it should survive long enough to make its way into the hands of someone more open-minded. Tath, in particular, is home to many mages. It only takes one who is willing to learn...”</i>"
{STORYTXT_BACKGROUND book.jpg}
[/part]
[part]
story= _ "The final entry gnaws at Mal Keshar. While he had been Darken Volk’s pawn, both of them were being used as pawns by the author of the book. Has his whole existence been nothing more than that of a puppet?"
{STORYTXT_BACKGROUND end.jpg}
[/part]
[part]
story= _ "Still, despite his misgivings about being manipulated, he feels that he can learn something from the book. Orcs had only ever been half of the story — the other had been his own people being unable to accept his use of dark magic. But, if he allowed a foolish hero to take a copy of the book, would others eventually follow in his footsteps? If enough people began to view necromancy as merely another magical art, could it eventually be accepted in society?"
{STORYTXT_BACKGROUND end.jpg}
[/part]
[/then]
[/if]
[if]
{VARIABLE_CONDITIONAL timesForever greater_than 2}
[then]
[part]
story= _ "The book still sits on a dusty shelf in Mal Keshar’s keep, untended and untouched, but constantly plaguing the forefront of the lich’s mind."
{STORYTXT_BACKGROUND end.jpg}
[/part]
[part]
story= _ "If he allowed a foolish hero to take a copy of the book, would others eventually follow in his footsteps? Would the author’s plan actually work, or would people continue to view necromancy as only a corrupting power? One voice tells him that being accepted by society should not be of any concern to him. Another says that it would not harm him to try. He does not come to any conclusions, but a slightly embellished copy of the tome sits there in his lair, waiting to be taken."
{STORYTXT_BACKGROUND end.jpg}
[/part]
[/then]
[/if]
[part]
story= _ "Rumors circulate of a lich who preys on scouting patrols. A hero, gathering his loyal troops to him, decides to put an end to the evil."
{STORYTXT_BACKGROUND end.jpg}
[/part]
[/story]
{DID_TRACK {JOURNEY_12_NEW}}
# wmllint: validate-off
[side]
side=1
controller=human
save_id=Malin Keshar
recruit=Walking Corpse,Vampire Bat,Ghost,Ghoul,Skeleton Archer,Skeleton,Dark Adept
{GOLD 220 200 180}
team_name=good
village_gold=1
user_team_name= _ "Mal Keshar"
{FLAG_VARIANT undead}
# wmllint: recognize Mal Keshar
{CHARACTER_STATS_MAL_KESHAR}
facing=ne
[/side]
# wmllint: validate-on
# Foolish Hero
[side]
side=2
controller=ai
# Place leader, grant gold, income and recruits later
no_leader=yes
gold=0
{NO_INCOME}
# Set ai values later
[/side]
# Too Foolish Hero
[side]
side=3
controller=ai
# Place leader, grant gold, income and recruits later
no_leader=yes
hidden=yes
gold=0
{NO_INCOME}
# Set ai values later
[/side]
{STARTING_VILLAGES 1 15}
[event]
name=prestart
{VARIABLE_OP timesForever add 1}
{VARIABLE second_hero_arrived 0}
[objectives]
side=1
delayed_variable_substitution=yes #so timesForever note works correctly when using debug
[objective]
condition=win
description= _ "Defeat the foolish hero"
[show_if]
{VARIABLE_CONDITIONAL timesForever less_than_equal_to 1}
[/show_if]
[/objective]
[objective]
condition=win
description= _ "Defeat another foolish hero"
[show_if]
{VARIABLE_CONDITIONAL timesForever numerical_equals 2}
[/show_if]
[/objective]
[objective]
condition=win
description= _ "Defeat yet another foolish hero"
[show_if]
{VARIABLE_CONDITIONAL timesForever greater_than_equal_to 3}
[and]
{VARIABLE_CONDITIONAL second_hero_arrived numerical_equals 0}
[/and]
[/show_if]
[/objective]
[objective]
condition=win
description= _ "Defeat both foolish heroes"
[show_if]
{VARIABLE_CONDITIONAL second_hero_arrived numerical_equals 1}
[/show_if]
[/objective]
[objective]
condition=lose
description= _ "Destruction of Mal Keshar"
[show_if]
{VARIABLE_CONDITIONAL timesForever less_than_equal_to 2}
[/show_if]
[/objective]
[objective]
{ALTERNATIVE_OBJECTIVE_CAPTION}
condition=win
description= _ "Allow an enemy unit to take the book"
[show_if]
{VARIABLE_CONDITIONAL timesForever greater_than_equal_to 3}
[/show_if]
[/objective]
[objective]
{ALTERNATIVE_OBJECTIVE_CAPTION}
condition=win
description= _ "Destruction of Mal Keshar"
[show_if]
{VARIABLE_CONDITIONAL timesForever greater_than_equal_to 3}
[/show_if]
[/objective]
[gold_carryover]
carryover_percentage=40
[/gold_carryover]
[note]
description="<b>" + _ "Endless Night $timesForever" + "</b>"
[/note]
[note]
# po: more text copied from Secrets of the Ancients
description= _ "To turn a necromancer into a lich, right-click on it while it is in a castle."
[/note]
{HAS_NO_TURN_LIMIT}
# No {IS_LAST_SCENARIO}, because the player can win and keep on playing
[/objectives]
{MODIFY_UNIT (id=Mal Keshar) profile (portraits/malin_lich-ancient.png)}
# There is now a menu option to turn necromancers into liches.
[set_menu_item]
id=lichify
description= _ "Transform into a lich"
image=units/icons/icon-lich.png
[show_if]
[have_unit]
x=$x1
y=$y1
side=1
type=Necromancer
[/have_unit]
[/show_if]
[command]
[if]
[have_location]
x=$x1
y=$y1
terrain=C*^*,K*^*,*^K*,*^C* # castles and keeps
[/have_location]
[then]
[fire_event]
name=lichify # See DiD's macros.cfg, or SotA’s sota-utils.cfg
[primary_unit]
x=$x1
y=$y1
[/primary_unit]
[/fire_event]
[/then]
[else]
[message]
speaker=narrator
image=misc/makeshift-altar.png
message= _ "You can only do this in a castle."
[/message]
[/else]
[/if]
[/command]
[/set_menu_item]
[if]
{VARIABLE_CONDITIONAL timesForever greater_than 1}
[then]
{VARIABLE previous_previous_randomHero $previous_randomHero}
{VARIABLE previous_randomHero $randomHero}
[/then]
[else]
{VARIABLE previous_previous_randomHero -1}
{VARIABLE previous_randomHero -1}
[/else]
[/if]
# let's pick a random hero type...
{VARIABLE_OP randomHero rand (human,bandit,elf,dwarf,orc)}
# and make sure it's not the same as last time
[while]
{VARIABLE_CONDITIONAL randomHero equals $previous_randomHero}
[or]
{VARIABLE_CONDITIONAL randomHero equals $previous_previous_randomHero}
[/or]
[do]
{VARIABLE_OP randomHero rand (human,bandit,elf,dwarf,orc)}
[/do]
[/while]
[if]
{VARIABLE_CONDITIONAL timesForever greater_than 4}
[then]
[replace_map]
map="{campaigns/Descent_Into_Darkness/maps/12a_Endless_Night.map}"
expand=yes
shrink=yes
[/replace_map]
# don't let the two foolish heroes be from the same faction
{VARIABLE_OP randomHero2 rand (human,bandit,elf,dwarf,orc)}
[while]
{VARIABLE_CONDITIONAL randomHero2 equals $randomHero}
[do]
{VARIABLE_OP randomHero2 rand (human,bandit,elf,dwarf,orc)}
[/do]
[/while]
{VARIABLE_OP flankturn rand 5..10}
[event]
name=new turn
[filter_condition]
[variable]
name=turn_number
numerical_equals=$flankturn
[/variable]
[/filter_condition]
# the text here is duplicated from below
[switch]
variable=randomHero2
[case]
value=human
[scroll_to]
x,y=2,50
[/scroll_to]
[move_unit_fake]
type="Royal Guard"
side=3
x= 2, 6, 8
y=50,49,46
[/move_unit_fake]
[unit]
side=3
type=Royal Guard
id=Too Foolish Hero
name= _ "Too Foolish Hero"
x,y=8,46
canrecruit=yes
animate=no
facing=ne
[/unit]
[terrain]
x,y=8,46
terrain=Ke
[/terrain]
[terrain]
x= 7,8-9,10
y=46-47,47,45-47
terrain=Ce
[/terrain]
[terrain]
x= 9, 5,12, 5
y=49,45,46,48
terrain=Uu^Vct
[/terrain]
[redraw][/redraw]
[capture_village]
side=3
x= 9, 5,12, 5
y=49,45,46,48
[/capture_village]
[message]
speaker=Too Foolish Hero
# po: the text that the "Too Foolish Hero" speaks is identical to that in the start event and can probably be copied over
message= _ "Your doom is at hand, lich! It is nigh time you answered for your evil crimes!"
[/message]
[modify_side]
side=3
user_team_name= _ "Humans"
{FLAG_VARIANT loyalist}
recruit=Spearman,Swordsman,Pikeman,Bowman,Longbowman,Heavy Infantryman,Shock Trooper,Mage,Red Mage,White Mage,Horseman,Knight,Lancer
[/modify_side]
{INCIDENTAL_MUSIC loyalists.ogg}
[/case]
[case]
value=bandit
[scroll_to]
x,y=2,50
[/scroll_to]
[move_unit_fake]
type=Highwayman
side=3
x= 2, 6, 8
y=50,49,46
[/move_unit_fake]
[unit]
side=3
type=Highwayman
id=Too Foolish Hero
name= _ "Too Foolish Hero"
x,y=8,46
canrecruit=yes
animate=no
facing=ne
[/unit]
[terrain]
x,y=8,46
terrain=Ke
[/terrain]
[terrain]
x= 7,8-9,10
y=46-47,47,45-47
terrain=Ce
[/terrain]
[terrain]
x= 9, 5,12, 5
y=49,45,46,48
terrain=Uu^Vct
[/terrain]
[redraw][/redraw]
[capture_village]
side=3
x= 9, 5,12, 5
y=49,45,46,48
[/capture_village]
[message]
speaker=Too Foolish Hero
message= _ "You have preyed on too many of my men. Our territory will be much more secure without your undead pestering us."
[/message]
[modify_side]
side=3
user_team_name= _ "Bandits"
# default flag
recruit=Thug,Bandit,Footpad,Outlaw,Poacher,Trapper,Thief,Rogue
[/modify_side]
{INCIDENTAL_MUSIC knolls.ogg}
[/case]
[case]
value=elf
[scroll_to]
x,y=2,50
[/scroll_to]
[move_unit_fake]
type="Elvish Marshal"
side=3
x= 2, 6, 8
y=50,49,46
[/move_unit_fake]
[unit]
side=3
type=Elvish Marshal
id=Too Foolish Hero
name= _ "Too Foolish Hero"
x,y=8,46
canrecruit=yes
animate=no
facing=ne
[/unit]
[terrain]
x,y=8,46
terrain=Ke
[/terrain]
[terrain]
x= 7,8-9,10
y=46-47,47,45-47
terrain=Ce
[/terrain]
[terrain]
x= 9, 5,12, 5
y=49,45,46,48
terrain=Uu^Vct
[/terrain]
[redraw][/redraw]
[capture_village]
side=3
x= 9, 5,12, 5
y=49,45,46,48
[/capture_village]
[message]
speaker=Too Foolish Hero
message= _ "We have finally found you, lich! Long have we heard of your abominable deeds, ensnaring the living with your dark sorceries and molding them into your slaves. Your wretched unlife ends here!"
[/message]
[modify_side]
side=3
user_team_name= _ "Elves"
{FLAG_VARIANT wood-elvish}
recruit=Elvish Fighter,Elvish Hero,Elvish Captain,Elvish Archer,Elvish Ranger,Elvish Marksman,Elvish Shaman,Elvish Sorceress,Elvish Druid,Elvish Scout,Elvish Rider,Wose
[/modify_side]
{INCIDENTAL_MUSIC elvish-theme.ogg}
[/case]
[case]
value=dwarf
[scroll_to]
x,y=2,50
[/scroll_to]
[move_unit_fake]
type="Dwarvish Lord"
side=3
x= 2, 6, 8
y=50,49,46
[/move_unit_fake]
[unit]
side=3
type=Dwarvish Lord
id=Too Foolish Hero
name= _ "Too Foolish Hero"
x,y=8,46
canrecruit=yes
animate=no
facing=ne
[/unit]
[terrain]
x,y=8,46
terrain=Ke
[/terrain]
[terrain]
x= 7,8-9,10
y=46-47,47,45-47
terrain=Ce
[/terrain]
[terrain]
x= 9, 5,12, 5
y=49,45,46,48
terrain=Uu^Vct
[/terrain]
[redraw][/redraw]
[capture_village]
side=3
x= 9, 5,12, 5
y=49,45,46,48
[/capture_village]
[message]
speaker=Too Foolish Hero
# po: written with a dwarvish accent - regular english would be "it's been along time since I've smashed some undead. You've got plenty of bones for my hammer to break"
message= _ "Been a long time since I’ve smashed me some undead. Ye gots ye plenty o’ bones for me hammer ta break."
[/message]
[modify_side]
side=3
user_team_name= _ "Dwarves"
{FLAG_VARIANT knalgan}
recruit=Dwarvish Fighter,Dwarvish Steelclad,Dwarvish Thunderer,Dwarvish Thunderguard,Dwarvish Stalwart,Dwarvish Guardsman,Dwarvish Ulfserker,Dwarvish Berserker,Dwarvish Scout,Dwarvish Pathfinder,Gryphon Rider,Gryphon Master
[/modify_side]
{INCIDENTAL_MUSIC knalgan_theme.ogg}
[/case]
[case]
value=orc
[scroll_to]
x,y=2,50
[/scroll_to]
[move_unit_fake]
type="Orcish Warlord"
side=3
x= 2, 6, 8
y=50,49,46
[/move_unit_fake]
[unit]
side=3
type=Orcish Warlord
id=Too Foolish Hero
name= _ "Too Foolish Hero"
x,y=8,46
canrecruit=yes
animate=no
facing=ne
[/unit]
[terrain]
x,y=8,46
terrain=Ke
[/terrain]
[terrain]
x= 7,8-9,10
y=46-47,47,45-47
terrain=Ce
[/terrain]
[terrain]
x= 9, 5,12, 5
y=49,45,46,48
terrain=Uu^Vct
[/terrain]
[redraw][/redraw]
[capture_village]
side=3
x= 9, 5,12, 5
y=49,45,46,48
[/capture_village]
[modify_side]
side=3
user_team_name= _ "Orcs"
{FLAG_VARIANT6 ragged}
recruit=Orcish Warrior,Orcish Slayer,Orcish Crossbowman,Troll,Troll Rocklobber
[/modify_side]
[message]
speaker=Too Foolish Hero
message= _ "I’ve finally found your lair, lich! You have attacked my tribe and wreaked havoc on our homes for many years. You slew my father and turned his body into one of your nasty creations. With your death, your annoying minions will pester us no longer!"
[/message]
{INCIDENTAL_MUSIC northerners.ogg}
[/case]
[/switch]
[message]
speaker=Mal Keshar
message= _ "I almost feel as if the universe is mocking me by sending me this many imbeciles..."
[/message]
[modify_side]
side=3
hidden=no
team_name=enemies
#ifdef EASY
gold="$(140 + 40 * $timesForever)"
income="$(5 + 1 * $timesForever)"
#endif
#ifdef NORMAL
gold="$(170 + 50 * $timesForever)"
income="$(6 + 2 * $timesForever)"
#endif
#ifdef HARD
gold="$(200 + 60 * $timesForever)"
income="$(7 + 3 * $timesForever)"
#endif
# see comments on lines 822 and 823 regarding aggression
[ai]
aggression="$(min( [1.0, (0.3 + 0.1 * $timesForever) ] ) )"
villages_per_scout=10
village_value=0.5
[/ai]
[/modify_side]
{VARIABLE second_hero_arrived 1}
[show_objectives]
side=1
[/show_objectives]
[/event]
[/then]
[/if]
[switch]
variable=randomHero
[case]
value=human
[unit]
side=2
type=Royal Guard
id=Foolish Hero
name= _ "Foolish Hero"
x,y=22,4
canrecruit=yes
facing=sw
[/unit]
[modify_side]
side=2
user_team_name= _ "Humans"
{FLAG_VARIANT loyalist}
recruit=Spearman,Swordsman,Pikeman,Bowman,Longbowman,Heavy Infantryman,Shock Trooper,Mage,Red Mage,White Mage,Horseman,Knight,Lancer
[/modify_side]
{REPLACE_SCENARIO_MUSIC loyalists.ogg}
[/case]
[case]
value=bandit
[unit]
side=2
type=Highwayman
id=Foolish Hero
name= _ "Foolish Hero"
x,y=22,4
canrecruit=yes
facing=sw
[/unit]
[modify_side]
side=2
user_team_name= _ "Bandits"
# default flag
recruit=Thug,Bandit,Footpad,Outlaw,Poacher,Trapper,Thief,Rogue
[/modify_side]
{REPLACE_SCENARIO_MUSIC knolls.ogg}
[/case]
[case]
value=elf
[unit]
side=2
type=Elvish Marshal
id=Foolish Hero
name= _ "Foolish Hero"
x,y=22,4
canrecruit=yes
facing=sw
[/unit]
[modify_side]
side=2
user_team_name= _ "Elves"
{FLAG_VARIANT wood-elvish}
recruit=Elvish Fighter,Elvish Hero,Elvish Captain,Elvish Archer,Elvish Ranger,Elvish Marksman,Elvish Shaman,Elvish Sorceress,Elvish Druid,Elvish Scout,Elvish Rider,Wose
[/modify_side]
{REPLACE_SCENARIO_MUSIC elvish-theme.ogg}
[/case]
[case]
value=dwarf
[unit]
side=2
type=Dwarvish Lord
id=Foolish Hero
name= _ "Foolish Hero"
x,y=22,4
canrecruit=yes
facing=sw
[/unit]
[modify_side]
side=2
user_team_name= _ "Dwarves"
{FLAG_VARIANT knalgan}
recruit=Dwarvish Fighter,Dwarvish Steelclad,Dwarvish Thunderer,Dwarvish Thunderguard,Dwarvish Stalwart,Dwarvish Guardsman,Dwarvish Ulfserker,Dwarvish Berserker,Dwarvish Scout,Dwarvish Pathfinder,Gryphon Rider,Gryphon Master
[/modify_side]
{REPLACE_SCENARIO_MUSIC knalgan_theme.ogg}
[/case]
[case]
value=orc
[unit]
side=2
type=Orcish Warlord
id=Foolish Hero
name= _ "Foolish Hero"
x,y=22,4
canrecruit=yes
facing=sw
[/unit]
[modify_side]
side=2
user_team_name= _ "Orcs"
{FLAG_VARIANT6 ragged}
recruit=Orcish Warrior,Orcish Slayer,Orcish Crossbowman,Troll,Troll Rocklobber
[/modify_side]
{REPLACE_SCENARIO_MUSIC northerners.ogg}
[/case]
[/switch]
[capture_village]
side=2
x=21,19,25,24
y= 2, 5, 4, 6
[/capture_village]
# Give the foolish hero gold & income based on timesForever
# Set ai aggression, it hits 1.0 at 7 timesForever, ensuring the enemy will attack.
[modify_side]
side=2
team_name=enemies
#ifdef EASY
gold="$(200 + 40 * $timesForever)"
income="$(5 + 5 * $timesForever)"
#endif
#ifdef NORMAL
gold="$(230 + 50 * $timesForever)"
income="$(6 + 6 * $timesForever)"
#endif
#ifdef HARD
gold="$(260 + 60 * $timesForever)"
income="$(7 + 7 * $timesForever)"
#endif
[ai]
aggression="$(min( [1.0, (0.3 + 0.1 * $timesForever) ] ) )"
villages_per_scout=10
village_value=0.5
[/ai]
[/modify_side]
# play only sad music after a few repetitions
[if]
{VARIABLE_CONDITIONAL timesForever greater_than_equal_to 3}
[then]
[music]
name=the_king_is_dead.ogg
append=yes
[/music]
[music]
name=weight_of_revenge.ogg
append=yes
[/music]
[music]
name=nunc_dimittis.ogg
append=yes
[/music]
[/then]
[else]
[music]
name=battle.ogg
append=yes
[/music]
[music]
name=casualties_of_war.ogg
append=yes
[/music]
[/else]
[/if]
[recall]
type=Skeletal Dragon
x,y=28,19
[/recall]
[/event]
[event]
name=start
# Additional dialog depending on how many times the scenario has been played
[switch]
variable=timesForever
[case]
value=1
# no additional dialog
[/case]
[case]
value=2
[message]
speaker=Mal Keshar
message= _ "I will destroy you like the last foolish hero who challenged me."
[/message]
[/case]
[case]
value=3
[message]
speaker=Mal Keshar
message= _ "Another foolish hero? Seriously?"
[/message]
[/case]
[case]
value=4
[message]
speaker=Mal Keshar
message= _ "Is there an endless supply of foolish heroes with death wishes? Honestly, where do you all come from?"
[/message]
[/case]
[else]
# 5 and up
{RANDOM 1..4}
[switch]
variable=random
[case]
value=1
[message]
speaker=Mal Keshar
message= _ "Am I doomed to fight foolish heroes forever?"
[/message]
[/case]
[case]
value=2
[message]
speaker=Mal Keshar
message= _ "How long is this going to keep happening?"
[/message]
[/case]
[case]
value=3
[message]
speaker=Mal Keshar
message= _ "..."
[/message]
[/case]
[else]
[message]
speaker=Mal Keshar
message= _ "At this point, I would be more surprised if these foolish heroes stopped showing up."
[/message]
[/else]
[/switch]
{CLEAR_VARIABLE random}
[/else]
[/switch]
[switch]
variable=randomHero
[case]
value=human
[message]
speaker=Foolish Hero
message= _ "Your doom is at hand, lich! It is nigh time you answered for your crimes against humanity!"
[/message]
[message]
speaker=Mal Keshar
# po: cityfolk - just a person from the city, e.g. Weldyn
message= _ "Narrow-minded and obtuse, as one would expect of cityfolk. Go back to your manors and taverns before I decide to kill you."
[/message]
[/case]
[case]
value=bandit
[message]
speaker=Foolish Hero
message= _ "You have preyed on too many of my men. Our territory will be much more secure without your undead pestering us."
[/message]
[message]
speaker=Mal Keshar
message= _ "Not even real soldiers. How meaningless."
[/message]
[/case]
[case]
value=elf
[message]
speaker=Foolish Hero
message= _ "We have finally found you, lich! Long have we heard of your abominable deeds, ensnaring the living with your dark sorceries and molding them into your slaves. Your wretched unlife ends here!"
[/message]
[message]
speaker=Mal Keshar
message= _ "Life or death, it is all the same. There are always those who try to kill me. Ever do they fail."
[/message]
[/case]
[case]
value=dwarf
[message]
speaker=Foolish Hero
# po: written with a dwarvish accent - regular english would be "it's been along time since I've smashed some undead. You've got plenty of bones for my hammer to break"
message= _ "Been a long time since I’ve smashed me some undead. Ye gots ye plenty o’ bones for me hammer ta break."
[/message]
[message]
speaker=Mal Keshar
message= _ "And it has been some time since I’ve had a supply of dwarven corpses to work with. I suppose I can put your hammers to good use in the mines."
[/message]
[/case]
[case]
value=orc
[message]
speaker=Foolish Hero
message= _ "I’ve finally found your lair, lich! You have attacked my tribe and wreaked havoc on our homes for many years. You slew my father and turned his body into one of your nasty creations. With your death, your annoying minions will pester us no longer!"
[/message]
[message]