-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
10_Alone_at_Last.cfg
785 lines (639 loc) · 20.6 KB
/
10_Alone_at_Last.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
#textdomain wesnoth-did
[scenario]
id=10_Alone_at_Last
name= _ "Alone at Last"
map_data="{campaigns/Descent_Into_Darkness/maps/10_Alone_at_Last.map}"
turns=24
next_scenario=11_Descent_into_Darkness
victory_when_enemies_defeated=no
{DEFAULT_SCHEDULE_DUSK}
{SCENARIO_MUSIC breaking_the_chains.ogg}
{EXTRA_SCENARIO_MUSIC vengeful.ogg}
{EXTRA_SCENARIO_MUSIC battle.ogg}
[story]
[part]
story= _ "As he enters the tunnel underneath Lord Karres’s manor, Darken Volk turns and, with a word and gesture causes the entrance to collapse. The two necromancers turn and begin walking down the pitch-black tunnel, temporarily safe from pursuit."
{STORYTXT_BACKGROUND travel.jpg}
[/part]
[part]
story= _ "They continue walking through the damp, cold air all through the morning and day, finally emerging as the last rays of sun sink below the horizon."
{STORYTXT_BACKGROUND travel.jpg}
[/part]
[/story]
{DID_TRACK {JOURNEY_10_NEW}}
# wmllint: validate-off
[side]
side=1
controller=human
recruit=Walking Corpse,Vampire Bat,Ghost,Ghoul,Skeleton Archer,Skeleton,Dark Adept DiD
gold=200
team_name=good
user_team_name= _ "Malin Keshar"
{FLAG_VARIANT undead}
# wmllint: recognize Malin Keshar
{CHARACTER_STATS_MALIN_KESHAR}
facing=ne
[/side]
# wmllint: validate-on
# Darken Volk
[side]
side=2
controller=ai
recruit=Blood Bat,Ghost,Wraith,Necrophage,Skeleton Archer,Bone Shooter,Skeleton,Revenant,Deathblade,Dark Adept DiD,Dark Sorcerer DiD
{GOLD 300 340 380}
team_name=bad
user_team_name= _ "Darken Volk"
no_leader=yes
{FLAG_VARIANT undead}
facing=ne
[ai]
village_value=0.2
villages_per_scout=10
[goal]
name=target
[criteria]
id=Malin Keshar
[/criteria]
value=2
[/goal]
[goal]
name=protect_unit
[criteria]
side=2
canrecruit=yes
[/criteria]
value=4
[/goal]
[/ai]
[/side]
# Paladins and co
[side]
side=3
controller=ai
recruit=Spearman,Heavy Infantryman,White Mage,Mage,Paladin
gold=0
team_name=wesnothians
user_team_name= _ "Wesnothians"
{FLAG_VARIANT loyalist}
income=-2
no_leader=yes
[ai]
village_value=0.1
villages_per_scout=10
#recruitment_pattern=fighter,healer
[goal]
name=target
[criteria]
side=2
[/criteria]
value=3
[/goal]
[goal]
name=target
[criteria]
side=1
[/criteria]
value=2
[/goal]
[/ai]
[/side]
# Dela Keshar
[side]
side=4
controller=ai
gold=0
recruit=Spearman,Bowman,Swordsman,Longbowman,Thug,Poacher,Footpad
team_name=wesnothians
user_team_name= _ "Wesnothians"
{FLAG_VARIANT loyalist}
no_leader=yes
income=-2
[ai]
passive_leader=yes
[goal]
name=target
[criteria]
id=Malin Keshar
[/criteria]
value=2
[/goal]
[/ai]
[/side]
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Blood Bat) 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Wraith) 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Necrophage) 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Bone Shooter) 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Revenant) 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Deathblade) 2}
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Dark Sorcerer DiD) 1}
#ifdef EASY
{LIMIT_CONTEMPORANEOUS_RECRUITS 3 Paladin 2}
#else
{LIMIT_CONTEMPORANEOUS_RECRUITS 3 Paladin 3}
#endif
[event]
name=prestart
[objectives]
side=1
[objective]
condition=win
description= _ "Take the book back from Darken Volk"
[/objective]
[objective]
condition=lose
description= _ "Death of Malin Keshar"
[/objective]
[gold_carryover]
bonus=no
carryover_percentage=40
[/gold_carryover]
[/objectives]
[store_unit]
[filter]
[filter_wml]
[variables]
got_inside_manor=yes
[/variables]
[/filter_wml]
[/filter]
kill=yes
variable=units_inside_manor
[/store_unit]
{FOREACH units_inside_manor i}
{VARIABLE units_inside_manor[$i].upkeep full}
[unstore_unit]
variable=units_inside_manor[$i]
find_vacant=no
[/unstore_unit]
{NEXT i}
{CLEAR_VARIABLE units_inside_manor}
# Scenario variables
{VARIABLE bookX -1}
{VARIABLE bookY -1}
{MODIFY_UNIT (id=Malin Keshar) profile (portraits/malin_old-decay.png)}
[recall]
id=Darken Volk
x,y=2,26
[/recall]
[store_unit]
[filter]
id=Darken Volk
[/filter]
kill=yes
variable=stored_Darken
[/store_unit]
{VARIABLE stored_Darken.side 2}
{VARIABLE stored_Darken.canrecruit yes}
{VARIABLE stored_Darken.role book_carrier}
# Removes the loyal trait and other misc stuff
{CLEAR_VARIABLE stored_Darken.modifications.trait[0]}
{CLEAR_VARIABLE stored_Darken.overlays}
{CLEAR_VARIABLE stored_Darken.ellipse}
[unstore_unit]
variable=stored_Darken
[/unstore_unit]
{CLEAR_VARIABLE stored_Darken}
[/event]
[event]
name=start
{MOVE_UNIT (id=Malin Keshar) 7 22}
{MOVE_UNIT (id=Darken Volk) 5 24}
[message]
speaker=Malin Keshar
message= _ "Well, we made it out. We got your precious book. What’s in it, anyway? And what do we do now?"
[/message]
[message]
speaker=Darken Volk
message= _ "‘We’? <i>We</i> do nothing. You are no longer my apprentice."
[/message]
{MOVE_UNIT (id=Darken Volk) 7 21}
{MODIFY_UNIT (id=Darken Volk) facing se}
[if]
[variable]
name=hasBook
equals=Malin
[/variable]
[then]
# Malin has the book
[message]
speaker=Darken Volk
message= _ "Now give the book to me."
[/message]
[message]
speaker=narrator
image=wesnoth-icon.png
message=_ "Darken Volk grabs the mysterious book from Malin’s hands and stalks away."
[/message]
[/then]
[else]
# DV already has book
[message]
speaker=Darken Volk
message= _ "Now go your own way, and I will go mine."
[/message]
[/else]
[/if]
{CLEAR_VARIABLE hasBook}
[unit_overlay]
id=Darken Volk
image="misc/book-icon.png"
[/unit_overlay]
{MODIFY_UNIT (id=Darken Volk) facing ne}
{MOVE_UNIT (id=Darken Volk) 19 19}
[delay]
time=500
[/delay]
[message]
speaker=Malin Keshar
message= _ "You can’t just leave me here!"
[/message]
{MOVE_UNIT (id=Malin Keshar) 9 20}
{CREATE_ADVISOR}
[message]
role=advisor
message= _ "Master, do you not see? He has merely been using you to get that book!"
[/message]
[message]
speaker=Malin Keshar
message= _ "What do you mean?"
[/message]
[message]
role=advisor
message= _ "He cares not about your noble quest to push back the orcs. He needed your help to fight the mages! The book is rightfully yours!"
[/message]
[message]
speaker=Malin Keshar
message= _ "Wait!"
[/message]
[message]
speaker=Malin Keshar
message= _ "All of the training you gave me, that was just so I would help you get that book! Return it to me now, or I will take it by force."
[/message]
{MODIFY_UNIT (id=Darken Volk) facing sw}
[message]
speaker=Darken Volk
message= _ "You are even more of a fool than I thought."
[/message]
{MOVE_UNIT (id=Malin Keshar) 5 17}
{MODIFY_UNIT (id=Malin Keshar) facing ne}
{MOVE_UNIT (id=Darken Volk) 26 10}
# Make camp
[terrain]
x,y=26,10
radius=1
terrain=Ce
[/terrain]
[terrain]
x,y=26,10
terrain=Ke
[/terrain]
{MODIFY_UNIT (id=Darken Volk) facing sw}
[/event]
# This helps prevent Darken from getting himself killed easily by preventing
# him from leaving his castle
[event]
name=side 2 turn refresh
first_time_only=no
[modify_unit]
[filter]
id=Darken Volk
[/filter]
[movement_costs]
flat=99
[/movement_costs]
[/modify_unit]
[/event]
[event]
name=side 2 turn end
first_time_only=no
[modify_unit]
[filter]
id=Darken Volk
[/filter]
[movement_costs]
flat=1
[/movement_costs]
[/modify_unit]
[/event]
[event]
name=attack
[filter]
side=1
[/filter]
[filter_second]
side=2
[/filter_second]
# Let's check for whether he's still alive, just in case the
# paladins somehow killed him already
[filter_condition]
[have_unit]
id=Darken Volk
[/have_unit]
[/filter_condition]
[message]
speaker=Malin Keshar
message= _ "You let me believe Parthyn would accept me back so when they didn’t I would be willing to attack my own countrymen!"
[/message]
[message]
speaker=Darken Volk
message= _ "What you let yourself believe is no fault of mine. Cease your foolish prattle. I gave you more power than you could have possibly dreamed. Use it to fight the orcs that annoy you so, not me."
[/message]
[message]
speaker=Malin Keshar
message= _ "So it is true! You took my home away from me. You took Drogan away. Now that all of that is gone, I will at least keep the fruits of my labors."
[/message]
[message]
speaker=Darken Volk
message= _ "Hardly. I will crush you easily."
[/message]
[message]
speaker=Malin Keshar
message= _ "Perhaps, but I have nothing left to lose."
[/message]
[/event]
[event]
name=attack
[filter]
side=1
[/filter]
[filter_second]
id=Darken Volk
[/filter_second]
[message]
speaker=Malin Keshar
message= _ "Now you shall pay for what you have done to me."
[/message]
[message]
speaker=Darken Volk
message= _ "Done? I have done nothing but give you an opportunity. You have chosen your own path. Now leave me alone!"
[/message]
[/event]
# Paladins!
[event]
name=turn 8
# Fake move the paladin in, set up a camp, have some
# dialog, and give him another paladin and a mage of light
{INCIDENTAL_MUSIC loyalists.ogg}
[move_unit_fake]
type=Paladin
x=34,33
y=27,26
side=3
[/move_unit_fake]
[unit]
type=Paladin
side=3
x,y=33,26
id=Sir Cadaeus
name= _ "Sir Cadaeus"
canrecruit=yes
animate=no
facing=nw
[/unit]
{GENERIC_UNIT 3 (Paladin) 34 25} {FACING nw}
{GENERIC_UNIT 3 (Paladin) 33 27} {FACING nw}
{GENERIC_UNIT 3 (Mage of Light) 32 25} {FACING nw}
# Make camp
[terrain]
x,y=33,26
radius=1
terrain=Ce
[/terrain]
[terrain]
x,y=33,26
terrain=Ke
[/terrain]
[redraw][/redraw]
[modify_side]
side=3
{QUANTITY gold 100 150 200}
income=20
[/modify_side]
[message]
speaker=Sir Cadaeus
message= _ "Your travels in this region have not gone unnoticed, foul necromancers! We have been tracking you for weeks, with our purpose renewed this morning upon hearing of the disaster you wreaked upon the goodly city of Tath."
[/message]
[message]
speaker=Sir Cadaeus
message= _ "Do not even think of running away — my horsemen can easily catch you. Yes, on this day you shall have to answer for your innumerable crimes."
[/message]
[message]
speaker=Darken Volk
message= _ "We’ll see how well your pompous words protect you from the blades of the undead once I have finished this upstart."
[/message]
[/event]
# Dela joins the party
[event]
name=side 4 turn 11
# Find a good location with no adjacent enemies for Dela to set up camp at
[store_locations]
x=20-25
y=2-3
[not]
[filter_adjacent_location]
[filter][/filter]
[/filter_adjacent_location]
[/not]
variable=possible_camp_locs
[/store_locations]
[if]
[variable]
name=possible_camp_locs.length
greater_than=0
[/variable]
# If such locations were found, pick one randomly...
[then]
{VARIABLE_OP camp_loc_i rand "0..$($possible_camp_locs.length - 1)"}
[/then]
# ...but if not, then just pick any non-occupied location
[else]
[store_locations]
x=20-25
y=2-3
[not]
[filter][/filter]
[/not]
variable=possible_camp_locs
[/store_locations]
{VARIABLE_OP camp_loc_i rand "0..$($possible_camp_locs.length - 1)"}
[/else]
[/if]
# Fake move Dela in, set up camp, have some dialog.
# She doesn't bring anyone with her.
{INCIDENTAL_MUSIC legends_of_the_north.ogg}
[move_unit_fake]
type=Frontier Baroness
x=23,$possible_camp_locs[$camp_loc_i].x
y=1,$possible_camp_locs[$camp_loc_i].y
side=4
[/move_unit_fake]
[unit]
side=4
x=$possible_camp_locs[$camp_loc_i].x
y=$possible_camp_locs[$camp_loc_i].y
animate=no
moves=0
facing=sw # We don't know where she'll come in, but sw seems a good general facing
# wmllint: recognize Dela Keshar
{CHARACTER_STATS_DELA_KESHAR}
[/unit]
# Make camp
[terrain]
x=$possible_camp_locs[$camp_loc_i].x
y=$possible_camp_locs[$camp_loc_i].y
radius=1
terrain=Ce
[/terrain]
[terrain]
x=$possible_camp_locs[$camp_loc_i].x
y=$possible_camp_locs[$camp_loc_i].y
terrain=Ke
[/terrain]
[redraw][/redraw]
{CLEAR_VARIABLE possible_camp_locs,camp_loc_i,camp_hexes}
[modify_side]
side=4
{QUANTITY gold 150 200 250}
income=20
[/modify_side]
[message]
speaker=Dela Keshar
message= _ "I told you, Malin, that I would find you again, and I have kept my word. I will not suffer you to bring any further harm to my people, and so you will not live to see another sunset."
[/message]
[message]
speaker=Malin Keshar
message= _ "You wrong me, sister. I have only tried to help. Have you not seen fewer orcs this past summer?"
[/message]
[message]
speaker=Dela Keshar
message= _ "I will not listen to any more of your lies. Men, attack!"
[/message]
[/event]
[event]
name=last breath
[filter]
id=Darken Volk
[/filter]
[message]
speaker=Darken Volk
message= _ "With my dying breath I curse you, Malin the Damned!"
[/message]
[message]
speaker=Malin Keshar
message= _ "Now I’ve just got to get that book off the battlefield!"
[/message]
[objectives]
side=1
[objective]
condition=win
description= _ "Bring the book back to Malin’s castle"
[/objective]
[objective]
condition=lose
description= _ "Death of Malin Keshar"
[/objective]
[gold_carryover]
bonus=no
carryover_percentage=40
[/gold_carryover]
[/objectives]
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "Pick up the book by moving a unit onto it. Bats and ghosts cannot carry the book."
[/message]
[/event]
[event]
name=die
first_time_only=no
[filter]
role=book_carrier
[/filter]
{VARIABLE bookX $x1}
{VARIABLE bookY $y1}
{PLACE_IMAGE (items/book5.png) ($bookX) ($bookY)}
[/event]
[event]
name=moveto
first_time_only=no
[filter]
x,y=$bookX,$bookY
side=1
[not]
type=Ghost,Wraith,Spectre,Shadow,Nightgaunt,Vampire Bat,Blood Bat,Dread Bat
[/not]
[/filter]
[remove_item]
x,y=$x1,$y1
image="items/book5.png"
[/remove_item]
[role]
x,y=$x1,$y1
role=book_carrier
[/role]
[unit_overlay]
x,y=$x1,$y1
image="misc/book-icon.png"
[/unit_overlay]
[message]
speaker=unit
message= _ "I have the book!"
[/message]
{VARIABLE bookX -1}
{VARIABLE bookY -1}
[/event]
# Inform the player if a unit cannot pick up the book
[event]
name=moveto
first_time_only=no
[filter]
x=$bookX
y=$bookY
side=1
type=Ghost,Wraith,Spectre,Shadow,Nightgaunt,Vampire Bat,Blood Bat,Dread Bat
[/filter]
[message]
speaker=unit
message= _ "I am sorry, master, but that is too heavy for me."
[/message]
[allow_undo][/allow_undo]
[/event]
[event]
name=time over
# TODO: add a message explaining defeat
[/event]
# Victory Condition
[event]
name=moveto
[filter]
role=book_carrier
side=1
[filter_location]
terrain=C*,K*
[and]
x,y=5,17
radius=2
[/and]
[/filter_location]
[/filter]
[remove_unit_overlay]
role=book_carrier
image="misc/book-icon.png"
[/remove_unit_overlay]
{MOVE_UNIT (id=Malin Keshar) 1 12}
[message]
speaker=Malin Keshar
message= _ "The paladins will not be able to pursue me through the mountains, and Dela will not dare take the soldiers too far from Parthyn."
[/message]
[endlevel]
result=victory
bonus=no
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/event]
[event]
name=victory
{CLEAR_VARIABLE bookX,bookY}
[/event]
{HERODEATH_MALIN}
[/scenario]