/
12_Evacuation.cfg
1013 lines (930 loc) · 39.4 KB
/
12_Evacuation.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-ei
#
# if the player is already struggling, this scenario is easy. With no recall list, you can win by just rushing Gweddry/Owaec/Dacyn acrosss
# and if you have a single castle of worthwhile recalls, it's still fairly easy to get across
#
# but a veteran player with a huge recall list will have difficulty getting everyone across the bridge safely, because of both the gold costs and the time limit
# this is designed to equalize things a little bit, and make it a little harder for a player's recall list to snowball out of control
#
#
# the extremely low turn limit is to discourage winning via killing enemy leaders.
# while killing enemy leaders is an option, it bypasses the ending cutscene and feels against the spirit of the scenario
# instead, players are encouraged to rush across the bridge as quickly as possible, which takes far fewer turns than direct combat
#
# low turn limit also discourages using the bridge chokepoint to farm excessive kills
#
#define SCENARIO_TURN_LIMIT
11 #enddef
#define TURNS_LOW_WARNING
9 #enddef
#define NOT_ACROSS_RIVER
[not]
x=0-4, 5-9
y=0-99,0-13
[/not]
#enddef
[scenario]
id=12_Evacuation
name= _ "Evacuation"
map_file=12_Evacuation.map
turns={SCENARIO_TURN_LIMIT}
next_scenario=13_Spoils_of_War
{WINTER_SCHEDULE}
current_time=1 # midday
{SCENARIO_MUSIC loyalists.ogg}
[story]
[part]
story= _ "Gweddry and his men escaped from the orcish prisons and fled westward as swiftly as they could, closely pursued by the orcs and their drake vassals."
music=silence.ogg
[/part]
[/story]
{EI_TRACK {JOURNEY_12_NEW} }
[side]
side=1
canrecruit=yes
controller=human
team_name=wesnothians
user_team_name=_"Wesnothians"
gold=0 # see notes in S09_Castle_In_The_Ice
{FLAG_VARIANT loyalist}
{CHARACTER_STATS_GWEDDRY}
[/side]
[side]
color=white
side=2
type=Orcish Warlord
id=Varrak-Klar
#po: In S12, a leader with a high but not unbeatable amount of gold.
#po: However, if Chief Dra-Nak survived S11 then S12's Varrak-Klar will be changed to an Orcish Sovereign and renamed to appear to be the Chief pursuing the escapees.
name= _ "Varrak-Klar"
canrecruit=yes
facing=sw
[modifications]
{TRAIT_RESILIENT}
{TRAIT_STRONG}
[/modifications]
controller=ai
recruit= # handle recruits via "LIMIT_CONTEMPORANEOUS_RECRUITS". Limit the total number to reduce screen clutter
{GOLD 0 75 125} # Since this scenario is so short, the first couple rounds of recruits matter much more than the later rounds.
{INCOME 23 73 123} # This distorts gold-based easy/normal scaling. Instead, balance via income.
team_name=bad
user_team_name=_"Clan Whitefang"
{FLAG_VARIANT6 ragged}
[ai]
leader_value=0
[/ai]
{LOYAL_UNIT 2 (Direwolf Rider) 31 1} {GUARDIAN} {FACING sw} # don't vary with difficulty, since these guys are purely for defense,
{LOYAL_UNIT 2 (Orcish Warrior) 30 6} {GUARDIAN} {FACING sw} # and we want to discourage killing enemy leaders even at low difficulties
{LOYAL_UNIT 2 (Orcish Warrior) 30 3} {GUARDIAN} {FACING sw}
{LOYAL_UNIT 2 (Orcish Crossbowman) 26 3} {GUARDIAN} {FACING sw}
{GENERIC_UNIT 2 (Goblin Pillager) 29 1} {FACING sw}
[+unit]
[modifications]
{TRAIT_RESILIENT}
{TRAIT_STRONG}
[/modifications]
[/unit]
# plus a few units that attack right away
{GENERIC_UNIT 2 (Wolf Rider) 30 1} {FACING sw}
[+unit]
[modifications]
{TRAIT_RESILIENT}
{TRAIT_STRONG}
[/modifications]
[/unit]
[/side]
{SILENTLY_LIMIT_LEADER_MOVES 2 1}
{STARTING_VILLAGES 2 5}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 "Wolf Rider" 1}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 "Goblin Pillager" 4}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 "Goblin Knight" 4}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 "Direwolf Rider" 4} # includes the starting loyal
[event]
name=prestart
[if]
{VARIABLE_CONDITIONAL dra_nak_dead not_equals yes}
[then]
{MODIFY_UNIT id=Varrak-Klar name _"Chief Dra-Nak"}
{ADVANCE_UNIT id=Varrak-Klar "Orcish Sovereign"}
[/then]
[/if]
[/event]
[side]
color=orange
side=3
type=Drake Flameheart
id=Mortic
name= _ "Mortic"
canrecruit=yes
controller=ai
experience=9 # since he probably got some XP from the fight in S09
[modifications]
{TRAIT_RESILIENT}
{TRAIT_STRONG}
[/modifications]
recruit= # handle recruits via "LIMIT_CONTEMPORANEOUS_RECRUITS". Limit the total number to reduce screen clutter
{GOLD 0 45 75} # Since this scenario is so short, the first couple rounds of recruits matter much more than the later rounds.
{INCOME 13 43 73} # This distorts gold-based easy/normal scaling. Instead, balance via income.
team_name=bad
user_team_name=_"Drakes"
[ai]
leader_value=0
[/ai]
{LOYAL_UNIT 3 (Drake Thrasher) 18 7} {GUARDIAN} {FACING se}
{LOYAL_UNIT 3 (Drake Warden) 14 9} {GUARDIAN} {FACING se}
{LOYAL_UNIT 3 (Hurricane Drake) 15 2} {GUARDIAN} {FACING se}
{LOYAL_UNIT 3 (Hurricane Drake) 13 1} {GUARDIAN} {FACING sw}
{LOYAL_UNIT 3 (Sky Drake) 12 2} {GUARDIAN} {FACING se}
{NOTRAIT_UNIT 3 (Drake Arbiter) 15 6}
[+unit]
[modifications]
{TRAIT_RESILIENT}
{TRAIT_STRONG}
[/modifications]
[/unit]
{NOTRAIT_UNIT 3 (Drake Clasher) 14 6}
[+unit]
[modifications]
{TRAIT_RESILIENT}
{TRAIT_INTELLIGENT}
[/modifications]
[/unit]
[/side]
{SILENTLY_LIMIT_LEADER_MOVES 3 1}
{STARTING_VILLAGES_AREA 3 14-19 0-11 0}
{LIMIT_CONTEMPORANEOUS_RECRUITS 3 "Drake Burner" 2} # if there's too many of these, chopping the bridge down seems meaningless
{LIMIT_CONTEMPORANEOUS_RECRUITS 3 "Drake Fighter" 2} # if there's too many of these, chopping the bridge down seems meaningless
{LIMIT_CONTEMPORANEOUS_RECRUITS 3 "Drake Clasher" 4}
{LIMIT_CONTEMPORANEOUS_RECRUITS 3 "Drake Arbiter" 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 3 "Drake Thrasher" 2} # includes the starting loyal
[side]
color=white
side=4
type=Orcish Slurbow
id=Rakkha
#po: In S12, a leader with a high but not unbeatable amount of gold.
name= _ "Rakkha"
canrecruit=yes
facing=sw
[modifications]
{TRAIT_QUICK}
{TRAIT_RESILIENT}
[/modifications]
controller=ai
recruit= # handle recruits via "LIMIT_CONTEMPORANEOUS_RECRUITS". Limit the total number to reduce screen clutter
{GOLD 0 45 75} # Since this scenario is so short, the first couple rounds of recruits matter much more than the later rounds.
{INCOME 13 43 73} # This distorts gold-based easy/normal scaling. Instead, balance via income.
team_name=bad
user_team_name=_"Clan Whitefang"
{FLAG_VARIANT6 ragged}
[ai]
leader_value=0
[/ai]
{LOYAL_UNIT 4 (Orcish Warrior) 22 21} {GUARDIAN} {FACING sw}
{LOYAL_UNIT 4 (Orcish Crossbowman) 18 24} {GUARDIAN} {FACING sw}
{GENERIC_UNIT 4 (Orcish Warrior) 25 24}
[+unit]
[modifications]
{TRAIT_RESILIENT}
{TRAIT_INTELLIGENT}
[/modifications]
[/unit]
{GENERIC_UNIT 4 (Orcish Archer) 29 22}
[+unit]
[modifications]
{TRAIT_RESILIENT}
{TRAIT_INTELLIGENT}
[/modifications]
[/unit]
[/side]
{SILENTLY_LIMIT_LEADER_MOVES 4 1}
{STARTING_VILLAGES_AREA 4 0-99 19-99 0}
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 "Orcish Grunt" 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 "Orcish Warrior" 3} # includes the starting loyal
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 "Orcish Archer" 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 "Orcish Crossbowman" 4} # includes the starting loyal
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 "Orcish Assassin" 2}
[event]
name=side 1 turn end
first_time_only=no
{RESET_SIDE_AI 2,3,4 offensive 0.8 0.25}
# drakes don't fly across the river
{MODIFY_SIDE_AI (3) (
[avoid]
x,y=0-5,0-99
[/avoid]
)}
{VARY_AI_BY_SCHEDULE_WINTER 2,3,4}
[/event]
[event]
name=prestart
{RECALL_XY Owaec 23 10}
{RECALL_XY Dacyn 24 11} # he's slow, so put him near the bridge
[modify_unit]
[filter]
id=Dacyn
[/filter]
[object]
id=dacyn_no_halo
[effect]
apply_to=remove_ability
[experimental_filter_ability]
tag_name=illuminates
[/experimental_filter_ability]
[/effect]
[/object]
[/modify_unit]
{RECALL_XY Addogin 24 9}
{RECALL_XY (Hahid al-Ali) 24 9} # he drinks an elixir of haste. To make it more meaningful, put him on the furthest tile from the bridge
{RECALL_XY Terraent 24 9}
{RECALL_XY Dolburras 23 11} # he's slow, so put him near the bridge
{RECALL_XY Grug 23 11}
{MODIFY_UNIT (id=Dacyn) hitpoints 21}
[objectives]
side=1
[objective]
description= _ "Move Owaec to the end of the bridge"
condition=win
[/objective]
{ALTERNATIVE_OBJECTIVE ( _ "Defeat all enemy leaders")}
[objective]
description= _ "Death of Gweddry, Dacyn, or Owaec"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[note]
description= _ "It is winter, daytime is shorter"
[/note]
[note]
description= _ "<b>Every unit east of the bridge when it is destroyed will be lost (including non-recalled units)</b>"
[/note]
[/objectives]
[/event]
[event]
name=start
[message]
speaker=Gweddry
message= _ "Dacyn, are you feeling better? We must keep moving! The orcs have almost caught up to us."
[/message]
[message]
speaker=Dacyn
message= _ "(cough) (cough) Yes, yes, I’m perfectly fine... (cough)"
[/message]
[message]
speaker=Owaec
message= _ "Such decrepitude is one ten-thousandth of what you deserve for wielding that evil amulet! But lo, a bridge in the distance! Hope is not yet lost."
[/message]
[message]
speaker=Gweddry
message= _ "We must get across quickly before we are cut off and overwhelmed. But the men are exhausted! We cannot keep running for much longer."
[/message]
[message]
speaker=Grug
message= _ "(nodding) Gruuhhh... Grug tired. Leg hurt..."
[/message]
[message]
speaker=Dolburras
#po: "Yeah, don't forget! My legs aren't as long as you humans'!"
message= _ "Aye, dinnae forget, my legs ain’t as long as ye human-folks’!"
[/message]
[message]
speaker=Owaec
message= _ "Tell the men they need not fear! I will cross last and destroy the bridge behind us so that the orcs cannot follow!"
[/message]
{HIGHLIGHT_IMAGE 4 15 items/gohere.png ()}
[message]
speaker=Hahid al-Ali
message= _ "Well I intend to cross first! Gold’s no good if I die before I can spend it! I’m not about to sacrifice myself to save you bunch of barbarians."
[/message]
[message]
speaker=Gweddry
message= _ "Everyone, get moving! Anyone left behind on this side of the bridge will surely be killed!"
[/message]
[message]
speaker=Addogin
message= _ "I’m gettin’ too old for this life..."
[/message]
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "All units <b>(including non-recalled units!)</b> left behind will be lost."
[/message]
{REPLACE_SCENARIO_MUSIC cry_from_elensefar.ogg}
{APPEND_MUSIC legends_of_the_north.ogg}
{APPEND_MUSIC frantic.ogg}
[store_gold] # store this now in case we spend it before the IF_GOLD event
side=1
[/store_gold]
[/event]
[event]
name=recruit,recall,moveto,side 1 turn end # so it triggers very quickly
[if]
{VARIABLE_CONDITIONAL gold less_than_equal_to 0}
[then]
[message]
speaker=Dacyn
message= _ "It is unfortunate (cough) that we have not saved any gold to recruit or recall. Escape for our soldiers is impossible, yet if us few rush immediately across the bridge we may be able to (cough)(cough) reach the far shore before the orcs can attack."
[/message]
[/then]
[else]
[if]
{VARIABLE_CONDITIONAL gold less_than 100}
[then]
[message]
speaker=Dacyn
message= _ "It is unfortunate (cough) that we have saved little gold to recruit or recall. Escape for everyone is likely impossible, yet if the 3 of us rush immediately across the bridge we may be able to (cough)(cough) reach the far shore before the orcs can attack."
[/message]
[/then]
[else]
[if]
{VARIABLE_CONDITIONAL gold less_than 200}
[then]
[message]
speaker=Dacyn
message= _ "We have enough gold to put up a fight, but the orcs are numerous (cough) and strong. Escape for everyone is likely impossible, yet if the 3 of us rush immediately across the bridge we may be able to (cough)(cough) reach the far shore before the orcs can attack."
[/message]
[/then]
[else]
[message]
speaker=Dacyn
message= _ "We have gold for many soldiers, but the bridge (cough) is long and narrow. Escape for everyone is likely impossible, yet if the 3 of us rush immediately across the bridge we may be able to (cough)(cough) reach the far shore before the orcs can attack."
[/message]
[/else]
[/if]
[/else]
[/if]
[/else]
[/if]
[message]
speaker=Owaec
#po: Although Dacyn is a Mage of Light, he currently doesn't have a halo.
#po: In the unlikely case that he was still L2 when he picked up the amulet, he's automatically advanced at that point in S10.
message= _ "Small wonder your Light has abandoned you, if you would leave our companions to the mercy of the orcs! We should all cross together and leave none behind!"
[/message]
[message]
speaker=Dacyn
#po: After this message the halo flickers and then stays on.
message= _ "(cough) My light? ...oh, oh yes, yes of course. Just one moment."
[/message]
[repeat]
times=8
[do]
[delay]
time=100
[/delay]
[modify_unit]
[filter]
id=Dacyn
[/filter]
[object]
id=dacyn_no_halo
[effect]
apply_to=remove_ability
[experimental_filter_ability]
tag_name=illuminates
[/experimental_filter_ability]
[/effect]
[/object]
[/modify_unit]
[redraw]
[/redraw]
[delay]
time=50
[/delay]
[remove_object]
id=Dacyn
object_id=dacyn_no_halo
[/remove_object]
[redraw]
[/redraw]
[/do]
[/repeat]
[delay]
time=750
[/delay]
[/event]
# hahid drinks an elixir
# not on turn 1, since there's already a big info dump there
[event]
name=side 1 turn 2
[filter_condition]
[have_unit]
id=Hahid al-Ali
[/have_unit]
[/filter_condition]
[message]
speaker=Hahid al-Ali
#po: He drinks an elixir between this message and the next one
message= _ "Trapped among barbarians and pursued by orcs... how in the sands did I get here? Time to break out something I’ve been saving for a rainy day..."
[/message]
{STORE_UNIT_VAR (id=Hahid al-Ali) x hahid_x}
{STORE_UNIT_VAR (id=Hahid al-Ali) y hahid_y}
{DISPLAY_HASTE}
{GIVE_HASTE $hahid_x $hahid_y ()}
{CLEAR_VARIABLE hahid_x}
{CLEAR_VARIABLE hahid_y}
[message]
speaker=Hahid al-Ali
#po: He drank an elixir between the last message and this one
message= _ "Nothing like some extra speed to help me get away!"
[/message]
[/event]
[event]
name=turn 5
[message]
speaker=Owaec
#po: Addressed to Gweddry, but many of the heroes except Dacyn are together in this conversation, assuming the player managed to collect them.
#po: It has to still make sense with only Gweddry and Owaec talking to each other.
message= _ "Gweddry, you saw how Dacyn struggled to channel his Light. What do you think of this?"
[/message]
[message]
speaker=Dolburras
message= _ "Aye, and have ye noticed the man’s cough? He be trying to hide it."
[/message]
[message]
speaker=Gweddry
message= _ "... it is a bad sign, to be sure. But Dacyn is determined to protect Wesnoth and destroy Mal-Ravanal, and I believe he is our only chance at doing so."
[/message]
[message]
speaker=Grug
message= _ "Magic man kind! Be good magic man be."
[/message]
[message]
speaker=Owaec
message= _ "I agree his intentions are good, but with each passing hour, that foul amulet’s darkness festers within him. What influence may it have?"
[/message]
[message]
speaker=Terraent
message= _ "I choose to place my faith in the holy Light, not the darkness! We will overcome Mal-Ravanal’s evil, and this dark amulet’s as well."
[/message]
[message]
speaker=Hahid al-Ali
#po: Last message in the "Gweddry, you saw how Dacyn struggled to channel his Light" conversation
message= _ "Bah, magic! There’s a reason the civilized people of my world eschew magic — we would never have to deal with problems like this back in my homeland."
[/message]
[/event]
# orcs announce their daytime retreat (and drakes complain about it)
[event]
name=turn 7
[filter_condition]
[have_unit]
race=orc
canrecruit=yes
[/have_unit]
[and]
[have_unit]
id=Mortic
[/have_unit]
[/and]
[/filter_condition]
[message]
race=orc
canrecruit=yes
#po: Speaker might be any of Chief Dra-Nak, Varrak-Klar or Rakkha; all three are male orcs.
message= _ "(squinting) I can’t see anything in this searing sunlight. Fall back, wait for dusk!"
[/message]
[message]
id=Mortic
#po: to the male orc leader who's ordering the retreat
message= _ "The sun strengthens my kin.
Daytime is our Domain.
We should press the attack."
[/message]
[message]
race=orc
canrecruit=yes
#po: The messages in this event give the player a chance to react to the retreat.
#po: By now they should know that enemies retreat during the day, but it's especially important to know now so they can evacuate.
message= _ "You heard me, wyrm! Wait. For. Dusk."
[/message]
[/event]
#define DESTROY_BRIDGE X Y
[sound]
name=wose-die.ogg
[/sound]
{MODIFY_TERRAIN Wo {X} {Y}}
[redraw][/redraw]
[kill]
x,y={X},{Y}
[not]
id=Owaec
[/not]
[not]
type_adv_tree=Drake Fighter,Drake Burner,Drake Glider
[/not]
[not]
variation=drake,falcon,gryphon,bat
[/not]
fire_event=yes
animate=yes
[/kill]
[delay]
time=400
[/delay]
#enddef
[event]
name=moveto
first_time_only=no
[filter]
x,y=4,15
id=Owaec
[/filter]
[message]
speaker=Owaec
message= _ "Is everyone across? I’m ready to chop down the bridge."
[/message]
[message]
speaker=Gweddry
message= _ "Hmm..."
[option]
label= _ "Yes, destroy the bridge."
[command]
[animate_unit]
flag=attack
[filter]
id=Owaec
[/filter]
[primary_attack]
name=greathammer
[/primary_attack]
hits=yes
[facing]
x,y=5,16
[/facing]
[/animate_unit]
{DESTROY_BRIDGE 4 15}
{DESTROY_BRIDGE 5 16}
{DESTROY_BRIDGE 6 16}
{DESTROY_BRIDGE 7 17}
#-----------------
# GWEDDRY/DACYN LEFT BEHIND
#-----------------
{FIND_NEARBY (
side=1
id=Gweddry,Dacyn # Owaec can't be left behind, since he's needed to chop down the bridge
{NOT_ACROSS_RIVER}
) 24 10 99}
[if]
{VARIABLE_CONDITIONAL found_unit.id equals Dacyn}
[then]
[message]
speaker=Dacyn
#po: Owaec has just destroyed the bridge
message= _ "Owaec, you fool! I am trapped on the east bank! Without my help Wesnoth will surely fall to Mal-Ravanal..."
[/message]
[endlevel]
result=defeat
[/endlevel]
[return][/return]
[/then]
[/if]
[if]
{VARIABLE_CONDITIONAL found_unit.id equals Gweddry}
[then]
[message]
speaker=Dacyn
#po: Owaec has just destroyed the bridge
message= _ "Owaec, you fool! Gweddry is trapped on the east bank! Without his help Wesnoth will surely fall to Mal-Ravanal..."
[/message]
[endlevel]
result=defeat
[/endlevel]
[return][/return]
[/then]
[/if]
{CLEAR_VARIABLE found_unit}
#-----------------
# UNITS LEFT BEHIND
#-----------------
{PUT_TO_RECALL_LIST (
side=1
{NOT_ACROSS_RIVER}
[not]
variation=drake,falcon,gryphon,bat
[/not]
)}
# if we have a meaningful amount of leveled units, play a brief cutscene
{STORE_RECALLS (level=2-99) left_behind_units} # first just store the 2-99 level units, so we can check the count
{STORE_RECALLS (level=2-99) gweddrys_remnants} # save these units in a new variable, which we'll use for the bonus scenario S99 (the original variable gets modified)
[if]
{VARIABLE_CONDITIONAL left_behind_units.length greater_than_equal_to 2}
[then]
{STORE_RECALLS (level=0-1) left_behind_units} # add the 0-1 units in too
{STORE_RECALLS (level=0-1) gweddrys_remnants}
[store_locations]
x=24,25,24,23, 26,25,23, 23,21,23 # assorted tiles near your starting keep
y=10,11, 9,10, 10,13, 9, 11,10,12
variable=recall_locations
[/store_locations]
[foreach]
array=recall_locations
[do]
[recall]
find_in=left_behind_units[0]
x,y=$this_item.x,$this_item.y
[/recall]
{CLEAR_VARIABLE left_behind_units[0]}
[/do]
[/foreach]
[message]
speaker=Owaec
#po: Several high-level units were left unrecalled. For a brief cutscene, 10 unrecalled units (high levels preferred) appear on the starting castle.
message= _ "Alas, what have I done? So many brave soldiers of Wesnoth, left behind in the wildlands..."
[/message]
[message]
side=1
x,y=21-26,9-13
level=2-99
[not]
id=Hahid al-Ali
[/not]
[not]
race=ogre
[/not]
#po: Said by any left-behind unit except ogres (they can't speak fluently) and Hahid al-Ali (it would be very out of character for him).
#po: TODO in 1.19: the "we" in this is a typo. It should be "you must ride ..."
message= _ "At least you three commanders are safe. From here, we must ride swift, ride strong, and ride to save all of Wesnoth!"
[/message]
[/then]
[else]
[message]
speaker=Owaec
#po: either got everyone across or left behind at most one L2 or L3 unit
message= _ "Huzzah, we have escaped the northerners! A true Clansman would never willingly leave his companions behind, and so have we clutched victory from the jaws of defeat!"
[/message]
[/else]
[/if]
{CLEAR_VARIABLE left_behind_units}
#-----------------
# ANNOUNCE OUR ESCAPE
#-----------------
[if]
[have_unit]
id=Mortic
[/have_unit]
[then]
[message]
speaker=Dacyn
message= _ "Yes, yes, (cough)(cough) that’s all well and good. With the bridge destroyed, the orcs cannot (cough) cross, but what of the drakes?"
[/message]
[/then]
[else]
[message]
speaker=Dacyn
message= _ "(cough) And with the drakes defeated, (cough)(cough) no enemies will be able to pursue us. Now, it is finally time for us to once again travel toward Weldyn."
[/message]
[/else]
[/if]
#-----------------
# MORTIC REBELS AGAINST ORCS
#-----------------
[if]
[have_unit]
id=Mortic
[/have_unit]
[then]
[message]
race=orc
canrecruit=yes
#po: Spoken to Mortic, but at this point it's possible that all the orc leaders are dead, in which case it doesn't get said.
message= _ "Useless pathetic ugly weakling wyrms! Fly across and chase after them, or we’ll sell you <i>all</i> to the necromancers!"
[/message]
[if]
{VARIABLE_CONDITIONAL dra_nak_dead equals yes}
[then]
[message]
speaker=Mortic
#po: to his fellow drakes, and any surviving orcs
message= _ "Dra-Nak is dead,
His armies weakened,
His prey fled."
[/message]
[/then]
[else]
[message]
speaker=Mortic
#po: to his fellow drakes, and any surviving orcs
message= _ "Dra-Nak is feeble,
His armies weakened,
His prey fled."
[/message]
[/else]
[/if]
[message]
speaker=Mortic
#po: to his fellow drakes, and any surviving orcs
message= _ "Long has our Honor been stained.
No longer shall it be.
Now we reclaim our Aerie,
And the strength of our Flight."
[/message]
{FIND_NEARBY (side=2,4) 14 7 99}
[if]
[not]
[variable]
name=found_unit.length
greater_than=0
[/variable]
[/not]
[then]
{GENERIC_UNIT 2 (Orcish Warrior) 31 2}
{GENERIC_UNIT 2 (Wolf Rider) 31 1}
{GENERIC_UNIT 2 (Orcish Archer) 30 3}
{FIND_NEARBY (side=2,4) 31 2 99}
[/then]
[/if]
{MOVE_UNIT id=Mortic $found_unit.x $found_unit.y}
[message]
speaker=$found_unit.id
#po: Speaker is an orc, and Mortic is flying towards them. "What? Hey!" *gets killed by Mortic*
message= _ "Wha- hey!"
[/message]
[animate_unit]
[filter]
id=Mortic
[/filter]
flag=attack
[primary_attack]
range=melee
[/primary_attack]
[facing]
x,y=$found_unit.x,$found_unit.y
[/facing]
hits=yes
[/animate_unit]
{KILL id=$found_unit.id ANIMATE=yes}
[message]
speaker=Mortic
message= _ "The Hunt is called!
The orcs our prey!
Flight of Mortic, we fight!"
[/message]
{VARIABLE drakes_rebelling yes} # used for S13 intro text
[/then]
[/if]
[kill]
side=1
{NOT_ACROSS_RIVER}
[not]
variation=drake,falcon,gryphon,bat
[/not]
[/kill]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/command]
[/option]
[option]
label= _ "No, not yet."
[command]
[allow_undo][/allow_undo]
[/command]
[/option]
[/message]
[/event]
[event]
name=turn {TURNS_LOW_WARNING}
[message]
speaker=Gweddry
message= _ "Hurry! If we cannot secure a position on the west bank, the drakes will surely fly behind and cut off our retreat!"
[/message]
[/event]
[event]
name=side 3 turn {SCENARIO_TURN_LIMIT}
[message]
speaker=Mortic
message= _ "The sun arises.
Second and third Wings,
Capture the west bank."
[/message]
[if]
[not]
[have_unit]
id=Mortic
[/have_unit]
[/not]
[then]
[message]
side=2,4
canrecruit=yes
#po: spoken by the leader of either orc side. Lots of drakes appear immediately after this.
message= _ "We need help over here! Where are the rest of those lousy drakes? They should be in position by now!"
[/message]
[/then]
[/if]
{RESET_SIDE_AI 3 offensive 0.99 0.01} # remove the avoid
# only spawn drakes that have a wing-flapping standing_anim. Gliders count, but only when in the water
# and spawn a whole lot of them, so the player doesn't think "really? I’m supposed to be defeated by *that*?"
{MOVE_UNIT x,y=12,2 4 7}
{MOVE_UNIT x,y=13,1 5 5}
{MOVE_UNIT x,y=15,2 4 5}
{GENERIC_UNIT 3 (Drake Glider) 10 1} {ANIMATE}
{GENERIC_UNIT 3 (Sky Drake) 9 1}
{GENERIC_UNIT 3 (Hurricane Drake) 7 1} {ANIMATE}
{GENERIC_UNIT 3 (Sky Drake) 5 1}
{GENERIC_UNIT 3 (Hurricane Drake) 5 1} {ANIMATE}
{GENERIC_UNIT 3 (Sky Drake) 5 1}
{GENERIC_UNIT 3 (Hurricane Drake) 3 1} {ANIMATE}
{GENERIC_UNIT 3 (Sky Drake) 3 1}
{GENERIC_UNIT 3 (Sky Drake) 1 1} {ANIMATE}
{GENERIC_UNIT 3 (Hurricane Drake) 1 1}
{GENERIC_UNIT 3 (Drake Glider) 9 5} {ANIMATE}
{GENERIC_UNIT 3 (Drake Glider) 8 7}
{GENERIC_UNIT 3 (Drake Glider) 7 5} {ANIMATE}
{GENERIC_UNIT 3 (Hurricane Drake) 1 5}
{GENERIC_UNIT 3 (Sky Drake) 1 7} {ANIMATE}
{NAMED_UNIT 3 (Sky Drake) 2 7 "bridgeburner" (_"Gel’ka") ()}
{GENERIC_UNIT 3 (Sky Drake) 1 8} {ANIMATE}
[message]
speaker=Dacyn
message= _ "We have not crossed the bridge in time. Now we will all be killed!"
[/message]
# don't actually end in defeat here; give them a chance to move and attack
# they'll probably kill player units, but that's ok because the "turns over" event triggers immediately after
[/event]
[event]
name=enemies defeated
[message]
speaker=Gweddry
message= _ "I can hardly believe it! We didn’t need to destroy the bridge after all."
[/message]
[message]
speaker=Owaec
message= _ "Huzzah, a glorious victory in the name of the Clans! Man will never flee from orc and drake; we have taught these northerners not to trifle with Wesnoth!"
[/message]
[message]
speaker=Dacyn
message= _ "(cough)(cough) Yes, yes, very well, well done. (cough) Now, it is finally time for us to see what has become of Wesnoth in our absence."
[/message]
[set_achievement]
content_for=eastern_invasion
id=ei_S12
[/set_achievement]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/event]
[event]
name=last breath
[filter]
id=Varrak-Klar
[/filter]
[if]
{VARIABLE_CONDITIONAL dra_nak_dead equals yes}
[then]
[message]
speaker="Varrak-Klar"
message= _ "Graahh! Stupid humans..."
[/message]
[/then]
[else]
[message]
speaker="Varrak-Klar" # name is 'Chief Dra-Nak' here
message= _ "Curse you all! Why couldn’t you have just died as tribute like everyone else? Now my glorious golden Empire will never be..."
[/message]
{VARIABLE dra_nak_dead yes}
[/else]
[/if]
[/event]
[event]
name=last breath
[filter]
id=Mortic
[/filter]
[message]
speaker=Mortic
#po: Aspirant is a drake military rank
message= _ "I am Aspirant no more."
[/message]
{VARIABLE mortic_dead yes}
[/event]
[event]
name=last breath
[filter]
id=Rakkha
[/filter]
[message]
speaker=Rakkha
message= _ "I hate you! Hate... hate... hate you..."
[/message]
[/event]
{FOREIGN_DEFEAT}