-
-
Notifications
You must be signed in to change notification settings - Fork 988
/
02_Flight.cfg
948 lines (850 loc) · 30 KB
/
02_Flight.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
#textdomain wesnoth-dw
# Hopefully Kai Krellis is at least half leveled up
# already. Otherwise, this can be painful. Recruit a buch of citizens
# and brawlers, and send them east with Krellis. Use citizens to lure
# the skeleton archer types into the water. They are easy pickings
# there for other citizens, brawlers, and Krellis. One of those guys
# gets Krellis half way up to level one. A few citizens should also
# survive to become brawlers. About the time you get Krellis leveled
# up, and you are thinking about retreating everyone else, the bats
# will arrive. Use hunters and initiates to clear a path back
# west. Send three or four expendable units with Krellis. Their job is
# only to keep him from getting stuck in a ZOC. Krellis runs for the
# corner, while the rest of the troops gain experience doing a
# fighting retreat from the skeletons, and other bad guys arriving in
# the middle of the map. Ignore gold for now. You don't need much on
# the next level.
# Killing all the enemy leaders will end the level, but that won't be
# easy. Killing any enemy is good though. Each one gives you a
# different bonus: Cash, a loyal bat, or a ring of strength.
# If one of the named enemies is killed, a variable is stored. That
# way, the same names won't get used in the last level.
[scenario]
name= _ "Flight"
map_data="{campaigns/Dead_Water/maps/Home_1.map}"
id=02_Flight
next_scenario=03_Wolf_Coast
[story]
[part]
{DW_BIGMAP}
story= _ "Kai Krellis was concerned that the undead might return, so he determined to learn as much as possible about them. His only clue was the name the necromancer had spoken: <i>“Lord Ravanal”</i>. He sent his swiftest scouts north and south along the coast to learn what they might about this Ravanal. The news they brought him was not good."
[/part]
[part]
{DW_BIGMAP}
story= _ "Mal-Ravanal, it seemed, was a great human wizard who had transformed himself into a lich. He had attacked the edges of the kingdom of Wesnoth, and was building a fearsome army of undead humans there. He had also sent necromancers to attack the orcs, and even the elves, in a quest for undead soldiers of different races. It seemed that he also lusted for merfolk slaves. Krellis’ scouts reported that more dark armies were heading north."
[/part]
[part]
{DW_BIGMAP}
story= _ "As the weeks went by, the veterans of the last battle helped train new recruits. Krellis’ army did not yet match his father’s, but he now had many competent soldiers. As he had expected, their adversaries soon arrived."
[/part]
[/story]
{DW_TRACK {JOURNEY_02_NEW} }
{DEFAULT_SCHEDULE}
{TURNS4 21 22 23 24}
victory_when_enemies_defeated=no
[side]
{SIDE_1}
{GOLD4 120 120 120 120}
[/side]
{STARTING_VILLAGES 1 6}
[event]
name=prestart
[music]
name=nunc_dimittis.ogg
[/music]
[music]
name=elvish-theme.ogg
append=yes
[/music]
# wmllint: who RECALL_LOYAL_UNITS is Cylanna, Gwabbo
{RECALL_LOYAL_UNITS}
[objectives]
side=1
[objective]
description= _ "Move Kai Krellis to the north-west corner of the map. He must be level one or higher."
condition=win
[/objective]
[objective]
{ALTERNATIVE_OBJECTIVE_CAPTION}
description= _ "Defeat all enemy leaders"+{OBJECTIVE_FOOTNOTE _"(different bonus for each)"}
condition=win
[show_if]
{VARIABLE_CONDITIONAL end_level_when_ring_picked_up boolean_equals no}
[/show_if]
[/objective]
[objective]
description= _ "Have a unit pick up the ring of power."
condition=win
[show_if]
{VARIABLE_CONDITIONAL end_level_when_ring_picked_up boolean_equals yes}
[/show_if]
[/objective]
{HOW_TO_LOSE}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
[terrain_mask]
x,y=33, 3
mask="_f, _f, _f, _f, _f, _f, _f
_f, _f, Ce, Ce, 4 Ke, Ce, _f
_f, _f, _f, Ce, Ce, _f, _f
_f, _f, _f, _f, Ce, _f, _f
_f, _f, _f, _f, _f, _f, _f
"
[/terrain_mask]
[/event]
[side]
side=2
controller=ai
user_team_name= _ "Mal-Ravanal’s Forces"
team_name=bad guys
color=teal
type=Lich
id=Mal-Kevek
name= _ "Mal-Kevek"
canrecruit=yes
[ai]
villages_per_scout=0
recruitment_pattern=scout, scout, scout, fighter
[avoid]
x=43,43,43,43,43,42,42,41,41,41,40,39,38,37,36,35,33,32
y=13,14,15,16,17,17,18,19,20,21,22,24,25,26,26,27,27,27
[/avoid]
[/ai]
{FLAG_VARIANT undead}
{GOLD4 210 240 340 450}
{INCOME4 4 8 10 14}
[/side]
[side]
side=3
controller=ai
user_team_name= _ "Mal-Ravanal’s Forces"
team_name=bad guys
color=orange
type=Necromancer
id=Mel Daveth
name= _ "Mel Daveth"
canrecruit=yes
[ai]
villages_per_scout=0
[/ai]
{FLAG_VARIANT undead}
{GOLD4 120 160 190 240}
{INCOME4 6 8 10 14}
[/side]
[side]
side=4
controller=ai
user_team_name= _ "Mal-Ravanal’s Forces"
team_name=bad guys
color=white
type=Death Knight
id=Dead Knight
canrecruit=yes
[ai]
recruitment_pattern=fighter, archer
[/ai]
{FLAG_VARIANT undead}
{GOLD4 220 240 350 450}
{INCOME4 4 8 10 14}
[/side]
{RING_OF_STRENGTH_EVENTS}
[event]
name=prestart
# I want more, not more powerful, units. Limit the level twos
# so the leaders have to buy more level ones
# The ifdefs are necessary because this macro will allow
# recruits that weren't originally in the recruit lists.
#ifdef EASY
[set_recruit]
side=2
recruit="Ghost, Ghoul, Wraith"
[/set_recruit]
[set_recruit]
side=3
recruit="Walking Corpse, Vampire Bat, Blood Bat"
[/set_recruit]
[set_recruit]
side=4
recruit="Vampire Bat, Skeleton Archer, Skeleton, Bone Shooter, Revenant"
[/set_recruit]
{LIMIT_CONTEMPORANEOUS_RECRUITS 3 (Blood Bat) 3}
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 (Bone Shooter) 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 Revenant 1}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 Wraith 3}
#endif
#ifdef NORMAL
[set_recruit]
side=2
recruit="Ghost, Ghoul, Wraith, Shadow"
[/set_recruit]
[set_recruit]
side=3
recruit="Walking Corpse, Soulless, Vampire Bat, Blood Bat"
[/set_recruit]
[set_recruit]
side=4
recruit="Vampire Bat, Skeleton Archer, Skeleton, Bone Shooter, Deathblade"
[/set_recruit]
{LIMIT_CONTEMPORANEOUS_RECRUITS 3 (Blood Bat) 4}
{LIMIT_CONTEMPORANEOUS_RECRUITS 3 (Soulless) 3}
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 (Bone Shooter) 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 Deathblade 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 Wraith 4}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 Shadow 1}
#endif
#ifdef HARD
[set_recruit]
side=2
recruit="Vampire Bat, Blood Bat, Ghost, Ghoul, Wraith, Shadow"
[/set_recruit]
[set_recruit]
side=3
recruit="Walking Corpse, Soulless, Vampire Bat, Blood Bat"
[/set_recruit]
[set_recruit]
side=4
recruit="Vampire Bat, Chocobone, Skeleton Archer, Skeleton, Bone Shooter, Deathblade"
[/set_recruit]
{LIMIT_CONTEMPORANEOUS_RECRUITS 3 (Blood Bat) 5}
{LIMIT_CONTEMPORANEOUS_RECRUITS 3 (Soulless) 4}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 Spectre 1}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 Wraith 3}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 Shadow 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 Chocobone 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 (Bone Shooter) 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 Deathblade 2}
#endif
#ifdef NIGHTMARE
[set_recruit]
side=2
recruit="Vampire Bat, Ghost, Ghoul, Wraith, Shadow, Spectre"
[/set_recruit]
[set_recruit]
side=3
recruit="Walking Corpse, Soulless, Vampire Bat, Blood Bat"
[/set_recruit]
[set_recruit]
side=4
recruit="Vampire Bat, Chocobone, Skeleton Archer, Skeleton, Bone Shooter, Deathblade, Banebow"
[/set_recruit]
{LIMIT_CONTEMPORANEOUS_RECRUITS 3 (Blood Bat) 5}
{LIMIT_CONTEMPORANEOUS_RECRUITS 3 (Soulless) 5}
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 Chocobone 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 (Bone Shooter) 3}
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 Deathblade 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 Banebow 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 Spectre 1}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 Wraith 4}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 Shadow 3}
#endif
{RECRUIT_UNIT_VARIATIONS 3 "Walking Corpse" swimmer}
{RECRUIT_UNIT_VARIATIONS 3 "Soulless" swimmer}
[/event]
[event]
name=start
[message]
speaker=Mal-Kevek
message= _ "You may have ended my first life, but you have only made me more powerful in death. Now I will teach you a lesson!"
[/message]
[message]
speaker=Mel Daveth
message= _ "Leave some of them for me."
[/message]
[message]
# wmllint: directory spellings Uhhh
speaker=Dead Knight
message= _ "Uhhh."
[/message]
[message]
speaker=Mel Daveth
message= _ "And him."
[/message]
[message]
speaker=Kai Krellis
message= _ "We are surrounded. Look how many there are! How can we defeat them this time?"
[/message]
[message]
speaker=Cylanna
message= _ "I am afraid we cannot. We need help. My old instructor, Tyegëa, teaches on an island to the north. She and her priestesses are powerful. With their help we could probably defeat these enemies. Our task is to convince her to leave her enclave."
[/message]
[message]
speaker=Kai Krellis
message= _ "You can do that, right?"
[/message]
[message]
speaker=Cylanna
message= _ "I am not sure that I can. However, you could."
[/message]
[message]
speaker=Kai Krellis
message= _ "Me? I’ve never even met Tyegëa. How can I convince her to help us if you cannot?"
[/message]
[message]
speaker=Cylanna
message= _ "You will just have to trust me on this. She will listen to you. I will say no more on the matter."
[/message]
[message]
speaker=Kai Krellis
message= _ "Very well. How do we get there?"
[/message]
[message]
speaker=Cylanna
message= _ "We follow the coast north, then go west to Bilheld Island. Tyegëa lives on a small island to the west of Bilheld, which is over ocean to the west-southwest of Tirigaz. Everyone will have to go; it is now deadly perilous here, and the open ocean west of Tirigaz can be dangerous for small groups."
[/message]
[store_unit]
[filter]
id=Kai Krellis
[/filter]
variable=KK
[/store_unit]
# We'll discuss why KK needs to level up, but only if he is
# currently at level 0.
[if]
[variable]
name=KK.level
numerical_equals=0
[/variable]
[then]
[if]
[have_unit]
id=Gwabbo
[/have_unit]
[then]
[message]
speaker=Gwabbo
message= _ "Most of your citizens are not soldiers who will simply obey your orders. It will not be voiced aloud, but if you leave now, some of the people will think this mission is just an excuse to run away."
[/message]
[/then]
[else]
[message]
speaker=Cylanna
message= _ "However, I am afraid that not everyone will follow you on so perilous an adventure. First you must prove you are not afraid of danger. If you leave now, many will think the mission is but an excuse to flee."
[/message]
[/else]
[/if]
[message]
speaker=Kai Krellis
message= _ "I am not afraid! My people will see me fight the undead before we leave, even if defeating them all is impossible."
[/message]
[/then]
[else]
[message]
speaker=Kai Krellis
message= _ "But will everyone follow me on so perilous an adventure? I am still a youth; it may be they will not trust me."
[/message]
[if]
[have_unit]
id=Gwabbo
[/have_unit]
[then]
[message]
speaker=Gwabbo
message= _ "They will follow. You proved your courage in our last battle. Your father, the Kai-that-was, would have been proud."
[/message]
[/then]
[else]
[message]
speaker=Cylanna
message= _ "You have proven your courage in battle, as tradition required of a kai; they will follow you now."
[/message]
[/else]
[/if]
[/else]
[/if]
[clear_variable]
name=KK
[/clear_variable]
{HIGHLIGHT_IMAGE 1 1 items/gohere.png ()}
[/event]
[event]
name=last breath
[filter]
id=Mal-Kevek
[/filter]
[message]
speaker=Mal-Kevek
message= _ "This is impossible!"
[/message]
[/event]
[event]
name=die
[filter]
id=Mal-Kevek
[/filter]
# It seems strange to have to kill him in a "die" event, but
# he's only *mostly* dead otherwise, and the bat can't appear
# at his location:
[kill]
id=Mal-Kevek
[/kill]
[if]
[have_unit]
side=2
race=undead
[/have_unit]
[then]
[kill]
side=2
race=undead
animate=yes
[/kill]
[message]
speaker=Cylanna
message= _ "With their master gone, the undead are vanishing!"
[/message]
[/then]
[/if]
[unit]
type=Dread Bat
side=1
[modifications]
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
{TRAIT_STRONG}
[/modifications]
id=Fearsome Bat
name= _ "Fearsome Bat"
side=1
x=$x1
y=$y1
{IS_LOYAL}
[/unit]
[if]
[have_unit]
x,y=$x2,$y2
id=Gwabbo
[/have_unit]
[then]
[message]
speaker=Kai Krellis
message= _ "That is a mighty bat!"
[/message]
[message]
speaker=second_unit
message= _ "It is no matter. I will destroy it immediately."
[/message]
[message]
speaker=Cylanna
message= _ "Hold a moment! Do you think, with its master gone, it might desire a new one?"
[/message]
[message]
speaker=Kai Krellis
message= _ "If it does not attack, do not kill it. Let us see if it follows us."
[/message]
[/then]
[else]
[if]
[have_unit]
x,y=$x2,$y2
race=bats
[/have_unit]
[then]
[message]
speaker=Kai Krellis
message= _ "That is a mighty bat!"
[/message]
[message]
speaker=second_unit
message= _ "Neep, neep!"
[/message]
[message]
speaker=Cylanna
message= _ "Hold a moment! Do you think, with its master gone, it might desire a new one?"
[/message]
[message]
speaker=Kai Krellis
message= _ "If it does not attack, do not kill it. Let us see if it follows us."
[/message]
[/then]
[else]
[message]
speaker=second_unit
message= _ "Look! There is a massive bat back here."
[/message]
[message]
speaker=Gwabbo
message= _ "Be courageous, and attack it anyway!"
[/message]
[message]
speaker=second_unit
message= _ "But it isn’t attacking <i>me</i>. Do you think, with its master gone, it might desire a new one?"
[/message]
[message]
speaker=Kai Krellis
message= _ "If it does not attack, we shall not kill it. Let us see if it follows us."
[/message]
[/else]
[/if]
[/else]
[/if]
# If either of the named characters is dead, we have to take
# note because they shouldn’t show up in the last
# scenario. (We'll just rename the bad guys in that case.)
[set_variable]
name=MK_dead
value=yes
[/set_variable]
[/event]
[event]
name=die
[filter]
id=Mel Daveth
[/filter]
[kill]
id=Mel Daveth
[/kill]
[if]
[have_unit]
side=3
race=undead
[/have_unit]
[then]
[kill]
side=3
race=undead
animate=yes
[/kill]
[message]
speaker=Cylanna
message= _ "With their master gone, the undead are fading away!"
[/message]
[/then]
[/if]
{RING_OF_STRENGTH_APPEARS}
[unit]
type=Vampire Bat
side=1
[modifications]
{TRAIT_LOYAL}
{TRAIT_INTELLIGENT}
[/modifications]
id=Friendly Bat
name= _ "Friendly Bat"
side=1
x=$x1
y=$y1
{IS_LOYAL}
[/unit]
[if]
[have_unit]
x,y=$x2,$y2
id=Kai Krellis
[/have_unit]
[then]
[message]
speaker=second_unit
message= _ "Look! There is a bat cowering in the corner here."
[/message]
[message]
speaker=Cylanna
message= _ "Aren’t you going to kill it? We need to keep moving."
[/message]
[message]
speaker=second_unit
message= _ "I would feel bad about that. It is, uh, licking my hand."
[/message]
[message]
speaker=Friendly Bat
message= _ "Neep?"
[/message]
[message]
speaker=Cylanna
message= _ "Apparently you have your own bat."
[/message]
[/then]
[else]
[if]
[have_unit]
x,y=$x2,$y2
race=bats
[/have_unit]
[then]
[message]
speaker=second_unit
message= _ "Neep, neep!"
[/message]
[message]
speaker=Kai Krellis
message= _ "Look! There is a bat."
[/message]
[message]
speaker=Cylanna
message= _ "Aren’t you going to kill it? We need to keep moving."
[/message]
[message]
speaker=Kai Krellis
message= _ "It’s kind of cute."
[/message]
[message]
speaker=Friendly Bat
message= _ "Neep?"
[/message]
[message]
speaker=Cylanna
message= _ "Apparently you have your own bat."
[/message]
[/then]
[else]
[message]
speaker=second_unit
message= _ "And look! There is a bat cowering in the corner here."
[/message]
[message]
speaker=Kai Krellis
message= _ "Well, kill it, and let’s keep moving."
[/message]
[message]
speaker=second_unit
message= _ "But look, it’s licking my hand."
[/message]
[message]
speaker=Friendly Bat
#po: This should just be "translated" to whatever noise a bat makes in your language.
message= _ "Neep?"
[/message]
[message]
speaker=second_unit
message= _ "It’s kind of cute."
[/message]
[message]
speaker=Kai Krellis
message= _ "Very well then. I suppose we have our own bat."
[/message]
[/else]
[/if]
[/else]
[/if]
[set_variable]
name=MD_dead
value=yes
[/set_variable]
[/event]
[event]
name=die
[filter]
id=Dead Knight
[/filter]
[kill]
id=Dead Knight
[/kill]
[if]
[have_unit]
side=4
race=undead
[/have_unit]
[then]
[kill]
side=4
race=undead
animate=yes
[/kill]
[message]
speaker=Cylanna
message= _ "With their master gone, the skeletons are crumbling!"
[/message]
[/then]
[/if]
[unit]
type=Walking Corpse
variation=bat
side=1
[modifications]
{TRAIT_LOYAL}
[/modifications]
id=Undead Bat
name= _ "Undead Bat"
side=1
x=$x1
y=$y1
{IS_LOYAL}
[/unit]
[if]
[have_unit]
x,y=$x2,$y2
race=bats
[/have_unit]
[then]
[message]
speaker=second_unit
message= _ "Neep, neep!"
[/message]
[message]
speaker=Kai Krellis
message= _ "Look! There is a bat. It is moving, but it looks half dead."
[/message]
[/then]
[else]
[message]
speaker=second_unit
message= _ "Look! There is a bat in the corner here. It is moving, but it looks half dead."
[/message]
[/else]
[/if]
[if]
[have_unit]
id=Gwabbo
[/have_unit]
[then]
[message]
speaker=Gwabbo
message= _ "No, that thing is all the way dead."
[/message]
[/then]
[else]
[message]
speaker=Cylanna
message= _ "Actually, I believe it is truly dead."
[/message]
[/else]
[/if]
[message]
speaker=Cylanna
message= _ "I believe it is undead and has no will of its own, but the Kai may have the will power to direct it."
[/message]
[message]
speaker=Kai Krellis
message= _ "Fascinating. I shall certainly try."
[/message]
# The chest looks funny if it's floating on top of the Death
# Knight's tent, so we offset it a bit
[item]
x,y=$x1,$y1
image=misc/blank-hex.png~BLIT(items/chest-open.png~CROP(0,0,68,54),4,18)
[/item]
[if]
[have_unit]
x,y=$x2,$y2
race=bats
[/have_unit]
[then]
[message]
speaker=second_unit
message= _ "Neep, neep!"
[/message]
[message]
speaker=Kai Krellis
message= _ "He had a chest in his tent, too. It is filled with gold!"
[/message]
[/then]
[else]
[message]
speaker=second_unit
message= _ "He had a chest in his tent, too. It is filled with gold!"
[/message]
[/else]
[/if]
[sound]
name=gold.ogg
[/sound]
[gold]
side=1
amount=120
[/gold]
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "You receive 120 gold."
[/message]
[/event]
#define SCENARIO_END
[message]
speaker=Kai Krellis
message= _ "It galls me to flee from our home, but we will return."
[/message]
[clear_variable]
name=ring_x
[/clear_variable]
[clear_variable]
name=ring_y
[/clear_variable]
[clear_variable]
name=KK
[/clear_variable]
[clear_variable]
name=get_ring
[/clear_variable]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
#enddef
# Win if KK gets to the corner
[event]
name=moveto
first_time_only=no
[allow_undo]
[/allow_undo]
[filter]
x=1
y=1
id=Kai Krellis
[/filter]
[store_unit]
[filter]
id=Kai Krellis
[/filter]
variable=KK
[/store_unit]
[if]
[variable]
name=KK.level
greater_than=0
[/variable]
[then]
{SCENARIO_END}
[/then]
[/if]
[/event]
# This event triggers a win if Kai Krellis advances while already
# sitting on the target hex:
[event]
name=post_advance
first_time_only=no
[filter]
x=1
y=1
id=Kai Krellis
[/filter]
{SCENARIO_END}
[/event]
[event]
name=enemies defeated
[if]
# If the ring is currently sitting on the map...
[variable]
name=ring_x
not_equals=999
[/variable]
#...then make the moveto event end the scenario
[then]
[message]
speaker=narrator
message= _ "Have a unit pick up the ring to end the scenario."
image=wesnoth-icon.png
[/message]
[set_variable]
name=end_level_when_ring_picked_up
value=yes
[/set_variable]
[/then]
# ...Otherwise, since the ring must have been picked up
# already, we'll end now.
[else]
[message]
speaker=Cylanna
message= _ "Killing these enemies was good, but there were many more on the way. It will take greater might than we have to defeat them."
[/message]
[message]
speaker=Kai Krellis
message= _ "Onward to Tyegëa’s island, then."
[/message]
{SCENARIO_END}
[/else]
[/if]
[/event]
{HERO_DEATHS}
[/scenario]