-
-
Notifications
You must be signed in to change notification settings - Fork 989
/
01_The_Morning_After.cfg
1447 lines (1244 loc) · 47.9 KB
/
01_The_Morning_After.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=01_The_Morning_After
name= _ "The Morning After"
{UTBS_MAP 01_The_Morning_After.map}
next_scenario=02_Across_the_Harsh_Sands
{TURNS 34 32 29}
# Since the scenario can't end until all the elves are rescued we
# can't allow it to end with the death of the necromancer
victory_when_enemies_defeated=no
{TWO_SUNS_DEFAULT_SCHEDULE}
{INTRO_AND_SCENARIO_MUSIC "elf-land.ogg" "revelation.ogg"}
{EXTRA_SCENARIO_MUSIC "nunc_dimittis.ogg"}
{EXTRA_SCENARIO_MUSIC "elvish-theme.ogg"}
{STORY_THE_MORNING_AFTER}
# Set sides - elves, monsters and necromancer
# wmllint: validate-off
[side]
side=1
controller=human
# Kaleh's start villages will support his initial recruits.
gold=0
{INCOME 4 2 0}
user_team_name= _ "team_name^Quenoth Elves"
{FLAG_VARIANT long}
# wmllint: recognize Kaleh
{KALEH}
shroud=yes
# Start with Nym
[unit]
# wmllint: who NYM is Nym
{NYM}
x,y=27,22
[/unit]
[/side]
# wmllint: validate-on
# Monster side : mudcrawlers and cuttlefish
[side]
side=2
controller=ai
team_name=monsters
user_team_name= _ "Monsters"
no_leader=yes
[ai]
{AI_SIMPLE_ALWAYS_ASPECT aggression 1.0}
{AI_SIMPLE_ALWAYS_ASPECT caution 0.0}
[/ai]
[/side]
# Undead side, doesn't start with a leader
[side]
side=3
controller=ai
# Gold and income set when Necromancer appears
#ifndef HARD
recruit=Skeleton, Skeleton Archer, Vampire Bat, Ghoul, Dark Adept
#endif
#ifdef HARD
recruit=Revenant, Bone Shooter, Blood Bat, Necrophage, Dark Adept, Deathblade
#endif
team_name=evil
user_team_name= _ "Evil"
{FLAG_VARIANT undead}
no_leader=yes
[ai]
{AI_SIMPLE_ALWAYS_ASPECT aggression 0.80}
{AI_SIMPLE_ALWAYS_ASPECT caution 0.10}
#ifdef HARD
{AI_SIMPLE_ALWAYS_ASPECT recruitment_pattern scout,fighter,fighter,fighter,archer}
#else
{AI_SIMPLE_ALWAYS_ASPECT recruitment_pattern scout,fighter,archer,fighter}
#endif
[/ai]
[/side]
[event]
name=prestart
#ifdef HARD
# Remove one village on HARD
[terrain]
x,y=53,3
terrain=Dd
[/terrain]
#endif
# Can't end scenario until all elves have been rescued (5 events)
[objectives]
summary= _ "Starting Objectives:"
[objective]
description= _ "Rescue surviving elves"
condition=win
[/objective]
[objective]
description= _ "Death of Kaleh"
condition=lose
[/objective]
[objective]
description= _ "Death of Nym"
condition=lose
[/objective]
[objective]
description= _ "Death of Garak"
condition=lose
[show_if]
# We could just use [have_unit], but if Garak or Zhul dies and the player
# checks the objectives, the respective objective won't be displayed,
# and disappearing objectives for no good reason would look buggy.
[variable]
name=found_garak
boolean_equals=yes
[/variable]
[/show_if]
[/objective]
[objective]
description= _ "Death of Zhul"
condition=lose
[show_if]
[variable]
name=found_zhul
boolean_equals=yes
[/variable]
[/show_if]
[/objective]
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
# Setting up the village occupants
# 2 fighters, 2 archers, 2 hunters (if not HARD), 2 scouts
[set_variables]
name=elf_pool
[value]
type="Quenoth Fighter"
name= _ "Lrea"
gender=female
[/value]
[value]
type="Quenoth Fighter"
name= _ "Piyru"
gender=male
[/value]
[value]
type="Quenoth Fighter"
name= _ "Frea"
gender=female
[/value]
[value]
type="Quenoth Scout"
name= _ "Danu"
gender=male
[/value]
[value]
type="Quenoth Scout"
name= _ "Hamuil"
gender=male
[/value]
[value]
type="Quenoth Scout"
name= _ "Anioh"
gender=male
[/value]
[value]
type="Tauroch Rider"
name= _ "Vemuil"
gender=male
[/value]
[value]
type="Tauroch Rider"
name= _ "Taliu"
gender=male
[/value]
[/set_variables]
[/event]
# Dialog at start of scenario
[event]
name=start
[message]
speaker=Nym
message= _ "Hey Kaleh, are you in there?"
[/message]
[message]
speaker=Kaleh
message= _ "Nym, is that you?"
[/message]
[message]
speaker=Nym
message= _ "Yes, come on out already. The storm has passed. With the morning light Naia has ended the terrible night."
[/message]
[message]
speaker=Kaleh
message= _ "Has the sky really stopped falling?"
[/message]
[message]
speaker=Nym
message= _ "I already told you, the sky is clear and empty. Now come quickly, silly, others may need our help."
[/message]
[message]
speaker=Kaleh
message= _ "What’s happened? Oh Eloh, the craters are everywhere, everything is gone, ruined. I can hardly recognize our village. I didn’t think it could be this bad."
[/message]
[message]
speaker=Nym
message= _ "Come on, Kaleh, we have to go see if anyone is hurt or needs help. I think I hear people calling from the south. Now is not a time for fear, we must be strong. After all you are the nephew of Tanuil, our leader, and you must answer to the call of duty. Perhaps in the light of day things won’t be as bad as you think. Let’s explore the village and see who else has survived the night."
[/message]
[message]
speaker=Kaleh
message= _ "Wait, our keep is just to the east. Our leader Tanuil must surely be recruiting others to help deal with the devastation. Perhaps we should go to the keep, before we explore the rest of the village."
[/message]
[/event]
# Dialog when Nym and Kaleh see the ruined keep
[event]
name=moveto
[filter]
x=33-40
y=19-26
side=1
[/filter]
[allow_undo][/allow_undo]
[message]
speaker=Kaleh
message= _ "Tanuil’s keep, our beautiful fortress, it is destroyed. How will we summon our people to battle?"
[/message]
[message]
speaker=Nym
message= _ "We must rally those survivors we can find amidst the rubble. It doesn’t look like anyone survived, but at least we can thank Eloh it was a quick death. But come on, we can’t dwell on the dead, we must help the living."
[/message]
[message]
speaker=Kaleh
message= _ "But if Tanuil is dead, who will lead us?"
[/message]
[message]
speaker=Nym
message= _ "That’s a question for another time. Let’s keep exploring the wreckage."
[/message]
[/event]
# There are 3 mudcrawler encounter spots, in the NW and SW corner
# and in the barracks. Depending on which way you circle around
# the village, you will encounter the NW or barracks first.
# Survivors - two mudcrawler events, Garak event, Zhul event, scout events
# Handle all events within the oasis boundary.
# This includes finding all the elves that we have to rescue, dealing with
# mudcrawlers and lake monster.
# ! -- Depends on
# $rescued_elves, $seen_mudcrawler
# North-West mudcrawler/villager encounter
# Elvish fighter and 2 archers fighting
# Easy: 1 giant mudcrawler, 3 small mudcrawlers
# Medium: 2 giant mudcrawlers, 2 small mudcrawlers
# Hard: 3 giant mudcrawlers, 1 small mudcrawler
# wmllint: local spelling Yasi
# First mudcrawler encounter event trigger
[event]
name=moveto
[filter]
x=17-26
y=23-28
side=1
[/filter]
# Activate the event
[fire_event]
name=first_mudcrawler_encounter
[/fire_event]
[/event]
[event]
name=first_mudcrawler_encounter
[set_variable]
name=rescued_elves
add=1
[/set_variable]
{NAMED_GENERIC_UNIT 1 "Quenoth Fighter" 24 25 "Vecnu" ( _ "Vecnu")}
{NAMED_GENERIC_UNIT 1 "Quenoth Fighter" 24 27 "Eranor" ( _ "Eranor")}
{NAMED_GENERIC_UNIT 1 "Tauroch Rider" 21 25 "Seela" ( _ "Seela")}
[+unit]
gender=female
[/unit]
# Again core macro, monsters shouldn’t have traits
{NOTRAIT_UNIT 2 "Giant Mudcrawler" 20 24}
#ifdef HARD
{NOTRAIT_UNIT 2 "Giant Mudcrawler" 20 25}
#else
{NOTRAIT_UNIT 2 "Small Mudcrawler" 20 25}
#endif
#ifdef EASY
{NOTRAIT_UNIT 2 "Small Mudcrawler" 23 27}
{NOTRAIT_UNIT 2 "Small Mudcrawler" 25 28}
#else
{NOTRAIT_UNIT 2 "Giant Mudcrawler" 23 27}
{NOTRAIT_UNIT 2 "Small Mudcrawler" 24 28}
#endif
[if]
[variable]
name=seen_mudcrawler
boolean_equals=no
[/variable]
[then]
# Haven't seen a mudcrawler yet, set the flag and perform
# what-the-hell-is-that routine.
{VARIABLE seen_mudcrawler yes}
[message]
speaker=Vecnu
message= _ "Kaleh, Nym, help us!"
[/message]
[message]
speaker=Nym
message= _ "What in Uria’s name is that?"
[/message]
[message]
speaker=Vecnu
message= _ "They came with the stones that fell from the sky. I know not what they are, but more seem to be emerging from the craters. If we don’t stop them there will be nothing left of our village or our people."
[/message]
[message]
speaker=Kaleh
message= _ "To battle, my friends! There are still those left who can fight."
[/message]
[/then]
[else]
# Seen a mudcrawler, do let's-kick-their-ass routine
[message]
speaker=Kaleh
message= _ "There are more of our people fighting the mud monsters!"
[/message]
[message]
speaker=Nym
message= _ "Then let’s join the battle!"
[/message]
[/else]
[/if]
[/event]
# South-West mudcrawler/villager encounter
# Elvish archer and 2 hunters fighting
# Easy: 1 giant mudcrawler, 3 small mudcrawlers
# Medium: 2 giant mudcrawlers, 2 small mudcrawlers
# Hard: 3 giant mudcrawlers, 1 small mudcrawler
# Second mudcrawler encounter event trigger
[event]
name=moveto
[filter]
x=17-28
y=29-36
side=1
[/filter]
[fire_event]
name=second_mudcrawler_encounter
[/fire_event]
[/event]
[event]
name=second_mudcrawler_encounter
[set_variable]
name=rescued_elves
add=1
[/set_variable]
{NAMED_GENERIC_UNIT 1 "Tauroch Rider" 24 34 "Eloshi" ( _ "Eloshi")}
{NAMED_GENERIC_UNIT 1 "Quenoth Scout" 19 33 "Illuvia" ( _ "Illuvia")}
[+unit]
gender=female
[/unit]
#ifdef HARD
{NAMED_GENERIC_UNIT 1 "Quenoth Fighter" 21 35 "Raynor" ( _ "Raynor")}
#else
{NAMED_GENERIC_UNIT 1 "Tauroch Rider" 21 35 "Raynor" ( _ "Raynor")}
#endif
{NOTRAIT_UNIT 2 "Giant Mudcrawler" 25 34}
{NOTRAIT_UNIT 2 "Small Mudcrawler" 21 36}
#ifdef HARD
{NOTRAIT_UNIT 2 "Giant Mudcrawler" 24 35}
#else
{NOTRAIT_UNIT 2 "Small Mudcrawler" 24 35}
#endif
#ifdef EASY
{NOTRAIT_UNIT 2 "Small Mudcrawler" 20 34}
#else
{NOTRAIT_UNIT 2 "Giant Mudcrawler" 20 34}
#endif
[message]
speaker=Kaleh
message=_ "More of these muddy crawlies, let’s get rid of them with haste."
[/message]
[/event]
# Training ground encounter
# Easy: 2 giant mudcrawler, 3 small mudcrawlers
# Medium: 3 giant mudcrawlers, 2 small mudcrawlers
# Hard: 4 giant mudcrawlers, 1 small mudcrawlers
# Third mudcrawler encounter event trigger
[event]
name=moveto
[filter]
x=32-39
y=32-36
side=1
[/filter]
[fire_event]
name=third_mudcrawler_encounter
[primary_unit]
id=$unit.id
[/primary_unit]
[/fire_event]
[/event]
[event]
name=third_mudcrawler_encounter
# We want this village captured to allow player move through it
# without losing the turn
[capture_village]
side=1
x,y=36,34
[/capture_village]
[set_variable]
name=rescued_elves
add=1
[/set_variable]
# wmllint: recognize Rocky Horror
{UNIT 2 "Giant Mudcrawler" 34 33 (
role="Rocky Horror"
generate_name,random_traits,random_gender=yes,no,yes
)}
{UNIT 2 "Giant Mudcrawler" 34 34 (
role="Rocky Horror"
generate_name,random_traits,random_gender=yes,no,yes
)}
{UNIT 2 "Small Mudcrawler" 34 35 (
role="Rocky Horror"
generate_name,random_traits,random_gender=yes,no,yes
)}
#ifdef HARD
{UNIT 2 "Giant Mudcrawler" 35 33 (
role="Rocky Horror"
generate_name,random_traits,random_gender=yes,no,yes
)}
#else
{UNIT 2 "Small Mudcrawler" 35 33 (
role="Rocky Horror"
generate_name,random_traits,random_gender=yes,no,yes
)}
#endif
#ifdef EASY
{UNIT 2 "Small Mudcrawler" 36 32 (
role="Rocky Horror"
generate_name,random_traits,random_gender=yes,no,yes
)}
#else
{UNIT 2 "Giant Mudcrawler" 36 32 (
role="Rocky Horror"
generate_name,random_traits,random_gender=yes,no,yes
)}
#endif
[unit]
# wmllint: who GARAK is Garak
{GARAK}
side=1
x,y=35,34
{ABILITY_TEACHING_EVENT}
[/unit]
{NAMED_GENERIC_UNIT 1 "Quenoth Fighter" 36 33 "Jorazan" ( _ "Jorazan")}
{NAMED_GENERIC_UNIT 1 "Quenoth Fighter" 35 34 "Zyara" ( _ "Zyara")}
[+unit]
gender=female
[/unit]
[message]
speaker=unit
message= _ "This is our training ground. And look, there is Garak, the captain of the guard. He and his fighters have survived the night!"
[/message]
[if]
[variable]
name=seen_mudcrawler
boolean_equals=no
[/variable]
[then]
# Again, haven't seen a mudcrawler yet, set the flag and perform what-the-hell-is-that routine.
{VARIABLE seen_mudcrawler yes}
[message]
speaker=Garak
message= _ "Kaleh, Nym, help us!"
[/message]
[message]
speaker=Nym
message= _ "What in Uria’s name is that?"
[/message]
[message]
speaker=Garak
message= _ "They came with the stones that fell from the sky. I know not what they are, but more seem to be emerging from the craters. If we don’t stop them there will be nothing left of our village or our people."
[/message]
[message]
speaker=Kaleh
message= _ "To battle, my friends! There are still those left who can fight."
[/message]
[/then]
[else]
[message]
speaker=Kaleh
message= _ "But they are fighting many mud creatures. Quick, we must help them!"
[/message]
[/else]
[/if]
{VARIABLE found_garak yes}
[show_objectives][/show_objectives]
[/event]
# Garak's speech when they kill the last of training grounds
# mudcrawlers. For this we use die event that on each
# occurrence checks if there are any more training ground
# mudcrawlers alive.
[event]
name=die
[filter]
role="Rocky Horror"
[/filter]
[filter_condition]
[have_unit]
role="Rocky Horror"
count=0
[/have_unit]
[/filter_condition]
[message]
speaker=second_unit
message= _ "Ha! They’re destroyed at last."
[/message]
[message]
speaker=Garak
message= _ "Thanks for the help. I am glad to see that so many have survived the night. But there’s no time to talk, we must save the rest of our people and crush any other of these earthen abominations back into the earth."
[/message]
[/event]
# The following three events are nested, because they are supposed to
# occur in that particular sequence with none of them bypassed.
# Thanks to this only one of them is loaded in memory at any given
# time before resolution.
# Approaching bridge dialog
[event]
name=moveto
[filter]
x=30-32
y=29-35
side=1
[/filter]
# Allow to undo the move before the event is triggered
[allow_undo][/allow_undo]
[message]
speaker=Kaleh
message= _ "This bridge leads to the holy island at the center of our lake."
[/message]
[message]
speaker=Nym
message= _ "Hmmmm. Some of the druids that worship on the island may still be alive. We should go check."
[/message]
[message]
speaker=Kaleh
message= _ "Be careful. The bridge is broken, so we’ll have to wade through the shallow water."
[/message]
# Finding druids
[event]
name=moveto
[filter]
x=30-32
y=27-29
side=1
[/filter]
[set_variable]
name=rescued_elves
add=1
[/set_variable]
[message]
speaker=Kaleh
message= _ "The great tree! It has been buried under the rocks. Our most holy sanctuary, defiled. Oh, Eloh, what shall we do?"
[/message]
[message]
speaker=Nym
message= _ "Is anyone still alive?"
[/message]
[unit]
# wmllint: who ZHUL is Zhul
{ZHUL}
side=1
x,y=31,27
[/unit]
#ifndef HARD
{NAMED_GENERIC_UNIT 1 "Quenoth Mystic" 30 27 "Ryoko" ( _ "Ryoko")}
#endif
{NAMED_GENERIC_UNIT 1 "Quenoth Mystic" 32 27 "Yuni" ( _ "Yuni")}
[message]
speaker=Zhul
message= _ "Finally! We were worried that no one else had survived."
[/message]
[message]
speaker=Nym
message= _ "Mother priestess, are you all right?"
[/message]
[message]
speaker=Zhul
message= _ "There’s no time to stand on ceremony. I’m fine. I’m afraid only a few of us survived, but we will lend you what skills we have. Show me to those who need healing."
[/message]
[message]
speaker=Kaleh
message= _ "But the great tree, it has been destroyed!"
[/message]
[message]
speaker=Zhul
message= _ "All things of this world come to an end, but the power of Eloh endures. A new one shall grow in its place. Come now, let us see to the needs of our people."
[/message]
{VARIABLE found_zhul yes}
[show_objectives][/show_objectives]
# Lake monster event
[event]
name=moveto
[filter]
x=30-32
y=30-34
side=1
[/filter]
[unit]
x,y=32,30
side=2
type=Cuttle Fish
name= _ "Deep One"
description= _ "The Deep Ones are gigantic aquatic monsters that lurk in the dark places of the world. Rarely do they come to the surface, and when they do the best way to survive an encounter with these monsters is to remain ashore. They can grab their opponents with strong tentacles, or spit a poisonous black ink from a distance."
# Deep one is basically a weakened Cuttlefish, it
# would be pretty much unbeatable if left without change
[modifications]
[trait]
id=Deep_one
[effect]
apply_to=attack
range=melee
increase_attacks={ON_DIFFICULTY -4 -3 -2}
[/effect]
[effect]
apply_to=hitpoints
increase_total={ON_DIFFICULTY -30 -27 -20}
[/effect]
#ifndef HARD
[effect]
apply_to=defense
replace=yes
[defense]
shallow_water=50
[/defense]
[/effect]
#endif
[/trait]
[/modifications]
[/unit]
[message]
speaker=narrator
message= _ "The water of the lake suddenly goes dark and unsettled, only to erupt in a swarm of tentacles the moment the first elf set foot off the island."
image=wesnoth-icon.png
[/message]
[message]
speaker=Nym
message= _ "What in Uria’s name is that?"
[/message]
[message]
speaker=Zhul
message= _ "I felt a great darkness in this lake, but I knew not what it was. The falling rocks must have woken it from its sleep."
[/message]
[message]
speaker=Kaleh
message= _ "Protect the priestesses, we shall send this monstrosity back to the depths it came from!"
[/message]
[/event]
[/event]
[/event]
# Grasslands dialog, when Kaleh and Nym approach the eastern fields,
# this will show only the first time player enters the stables area
[event]
name=moveto
[filter]
x=39-44
y=26-33
side=1
[/filter]
[message]
speaker=Kaleh
message= _ "These fields seem strangely vacant. Where are the horses?"
[/message]
[message]
speaker=Nym
message= _ "Maybe they’re hiding in the stables. Let’s go check."
[/message]
[/event]
# These two events actually do the same thing on two different
# villages.
#define STABLE X Y
[event]
name=moveto
[filter]
[filter_location]
x={X}
y={Y}
radius=1
[/filter_location]
side=1
[/filter]
[fire_event]
name=stable found
[primary_unit]
x=$x1
y=$y1
[/primary_unit]
[/fire_event]
[/event]
#enddef
{STABLE 43 29}
{STABLE 43 32}
#undef STABLE
# Moved to stables and found a scout. We have none, spawn Naru
[event]
name=stable found
{NAMED_GENERIC_UNIT 1 "Quenoth Scout" $x1 $y1 "Naru" (_"Naru")}
[message]
speaker=Naru
message= _ "Is it safe to come out? I was so scared."
[/message]
[message]
speaker=Kaleh
message= _ "Where are all the other horses?"
[/message]
[message]
speaker=Naru
message= _ "A hunting party left just yesterday, so unless the rocks fell all over the land, many of the horses have probably survived. The few that remained here were scared by the falling rocks and fled into the night. It took all my skill to calm Yasi and keep him from running."
[/message]
[message]
speaker=Kaleh
message= _ "We’ll need your help in checking to see if the outer settlements survived. Who knows what kinds of damage they suffered in the night? And perhaps some of the people out in the desert have been able to round up some of the loose horses."
[/message]
[message]
speaker=Nym
message= _ "We can only hope that hunting party returns soon."
[/message]
# We have Naru, spawn Nisa
# This event replaces containing event to ensure units are found in order
[event]
name=stable found
[message]
speaker=unit
message= _ "Hey, Nisa, the rocks have stopped falling. You can come out now!"
[/message]
{NAMED_UNIT 1 "Quenoth Scout" $x1 $y1 "Nisa" (_"Nisa") (gender=female)}
[set_variable]
name=rescued_elves
add=1
[/set_variable]
[message]
speaker=Nisa
message= _ "Oh, thank Eloh, I thought they would never stop."
[/message]
[/event]
[/event]
# The following start and two capture events handle the discovery of
# random elves in the outer villages. If the player captures a village
# before an undead unit does, he has a chance of finding a random elf
# (picked from the $elf_pool array set up in prestart) to join him. However,
# if an undead unit had captured the village first, there's nothing left.
#
# The information about who captured a village first and whether the player
# has visited the village already is stored in a container unique to each
# village location, set when someone steps on the village for the first
# time. For example if the undead capture the village at 30,8 first, the
# following container would be set:
#
# [village_at_30_8]
# captured_by=undead
# [/village_at_30_8]
[event]
name=start
# There is a number of houses inside the oasis and even more tents
# by the necromancer's fort, we need to make sure that these are
# ignored. To do this we store coordinates ([store_locations]) of
# all desert villages (Dd^Vt) that are not ([not]) within
# rectangle defined by points 40,1 60,12 (x=40-60, y=1-12) or
# ([or]) rectangle defined by 22,24 43,34 . First rectangle
# includes all villages near necromancer, the second covers whole
# oasis. These coordinates are stored to array called
# outer_villages (variable=outer_villages).
[store_locations]
variable=outer_villages
terrain=Dd^Vdt,Dd^Vda
[not]
x=40-60
y=1-12
[or]
x=22-43
y=24-34
[/or]
[/not]
[/store_locations]
[/event]
[event]
name=capture
first_time_only=no
[filter]
side=1
[filter_location]
find_in=outer_villages
[/filter_location]
[/filter]
[filter_condition]
[variable]
name=village_at_$x1|_$y1|.visited_by_player
not_equals=yes
[/variable]
[/filter_condition]
{VARIABLE village_at_$x1|_$y1|.visited_by_player yes}
[if]
[variable]
name=village_at_$x1|_$y1|.captured_by
not_equals=undead
[/variable]
# if this village wasn't captured by undead first, the
# player has a chance of finding a random elf
[then]
{VARIABLE_OP fate rand "1..100"}
# And check if it's lower than a threshold of
# finding an unit that's dependent on difficulty
# level: 60% on easy, 50% on normal, 40% on
# hard. We use preprocesor to choose appropriate
# chance
[if]
[variable]
name=fate
less_than_equal_to={ON_DIFFICULTY 60 50 40}
[/variable]
[then]
# So the RNG smiled upon the player, time to pick a
# random elf from pool we defined in prestart
{VARIABLE_OP random_elf_pool_index rand "1..$elf_pool.length"}
{VARIABLE_OP random_elf_pool_index sub 1}
[unit]
side=1
type=$elf_pool[$random_elf_pool_index].type
x,y=$x1,$y1
name=$elf_pool[$random_elf_pool_index].name
gender=$elf_pool[$random_elf_pool_index].gender
random_traits=yes
#ifdef EASY
{IS_LOYAL}
[modifications]
{TRAIT_LOYAL}
[/modifications]
#endif
[/unit]
# When done remove unit from the pool
{CLEAR_VARIABLE elf_pool[$random_elf_pool_index]}
{CLEAR_VARIABLE random_elf_pool_index}
# And write joyful message
[message]
speaker=unit
message= _ "Oh good, some elves have survived in this outer settlement. They’ve agreed to help us search for other survivors."
[/message]
[/then]
# And when RNG plays hardball we need to
# inform the player he's out of luck
[else]
[message]
speaker=unit
message= _ "The encampment is empty. I wonder what happened to the inhabitants?"
[/message]
[/else]
[/if]
{CLEAR_VARIABLE fate}
[/then]
# If this village was captured by undead first, the player
# can't find any elves there anymore
[else]
[message]
speaker=unit
message= _ "This encampment has been abandoned. There are signs of a struggle and a few bloodstains but nothing else. I fear for those elves who lived out here."
[/message]
[/else]
[/if]
[/event]