/
11_Descent_into_Darkness.cfg
857 lines (714 loc) · 21.3 KB
/
11_Descent_into_Darkness.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
#textdomain wesnoth-did
[scenario]
id=11_Descent_into_Darkness
name= _ "Descent into Darkness"
map_data="{campaigns/Descent_Into_Darkness/maps/11_Descent_into_Darkness.map}"
turns=-1
next_scenario=12_Endless_Night
victory_when_enemies_defeated=no
{UNDERGROUND}
{SCENARIO_MUSIC the_deep_path.ogg}
{EXTRA_SCENARIO_MUSIC the_king_is_dead.ogg}
{EXTRA_SCENARIO_MUSIC revelation.ogg}
[story]
[part]
music=the_city_falls.ogg
story= _ "<i>“To become a lich, one must first die.”</i>"
{STORYTXT_BACKGROUND book.jpg}
[/part]
[part]
story= _ "So reads the book that Malin has reclaimed. <i>“The spells of necromancy bind the spirit, but only once it has been unbound from the body. To become a lich, the mage must make the necessary incantations with his dying breaths. He thus binds his own spirit in much the same way necromancers bind the spirits of others. Because he retains his own will, however, the lich can call upon the awesome powers of the spirit world.”</i>"
{STORYTXT_BACKGROUND book.jpg}
[/part]
[part]
story= _ "The words, and the idea, stick in the back of his mind. With all of Wesnoth forbidden to him, Malin finds refuge in a nameless frontier village where few questions are asked. When word filters to the town that Parthyn has been overrun by orcs, it rekindles hatred within him. With renewed purpose, he raises his undead minions and travels northward."
{STORYTXT_BACKGROUND travel.jpg}
[/part]
[part]
story= _ "Malin soon finds the track of an enormous orc army, and follows them until he reaches their camp. As he sees the number of orcs, the enormity of his quest begins to dawn on him. He attacks the camp anyway but is quickly driven back, and badly injured by a thrown orcish dagger as he retreats. He finds refuge in a small cave."
{STORYTXT_BACKGROUND end.jpg}
[/part]
[/story]
{DID_TRACK {JOURNEY_11_NEW}}
# wmllint: validate-off
[side]
side=1
controller=human
recruit=Walking Corpse,Vampire Bat,Ghost,Ghoul,Skeleton Archer,Skeleton,Dark Adept DiD
gold=100
team_name=good
user_team_name= _ "Mal Keshar"
{FLAG_VARIANT undead}
income=-2
# wmllint: recognize Malin Keshar
{CHARACTER_STATS_MALIN_KESHAR}
facing=ne
fog=yes
shroud=yes
[/side]
#define TROLL_GUARD TYPE X Y
[unit]
type={TYPE}
x,y={X},{Y}
random_traits=yes
generate_name=yes
ai_special=guardian
upkeep=loyal
overlays="misc/loyal-icon.png"
[/unit]
#enddef
# wmllint: validate-on
# Troll leader
[side]
side=2
controller=ai
recruit=Troll Whelp,Troll,Troll Rocklobber,Troll Warrior,Troll Shaman
gold=60
team_name=trolls
user_team_name= _ "Trolls"
income=-2
# place leader later
no_leader=yes
fog=yes
# Castle trolls
#ifndef EASY
{TROLL_GUARD (Troll) 7 7}
#endif
{TROLL_GUARD (Troll) 14 7}
{TROLL_GUARD (Troll) 8 7}
{TROLL_GUARD (Troll) 16 3}
{TROLL_GUARD (Troll Rocklobber) 12 1}
{TROLL_GUARD (Troll Shaman) 7 4}
[ai]
caution=0.5
grouping=defensive
recruitment_pattern=fighter,fighter,mixed fighter
[goal]
name=protect_unit
[criteria]
side=2
canrecruit=yes
[/criteria]
value=10
[/goal]
# Avoid the spiders and the beginning area
[avoid]
x=2-9,2-27
y=11-15,30-35
[/avoid]
[/ai]
[/side]
# Eastern village trolls
[side]
side=3
controller=ai
gold=0
team_name=trolls
user_team_name= _ "Trolls"
income=-2
no_leader=yes
fog=yes
# Eastern village trolls
{TROLL_GUARD (Troll) 30 19}
{TROLL_GUARD (Troll) 31 12}
{TROLL_GUARD (Troll Shaman) 33 14}
#ifdef NORMAL
{TROLL_GUARD (Troll Whelp) 31 16}
#endif
#ifdef HARD
{TROLL_GUARD (Troll Rocklobber) 27 16}
#endif
[ai]
# Avoid the spiders and the beginning area
[avoid]
x=2-9,2-27
y=11-15,30-35
[/avoid]
[/ai]
[/side]
# Western village trolls
[side]
side=4
team_name=trolls
user_team_name= _ "Trolls"
controller=ai
no_leader=yes
income=-2
gold=0
fog=yes
# Western village trolls
{TROLL_GUARD (Troll) 10 16}
{TROLL_GUARD (Troll) 10 26}
{TROLL_GUARD (Troll Shaman) 4 21}
{TROLL_GUARD (Troll Whelp) 2 25}
#ifdef NORMAL
{TROLL_GUARD (Troll Whelp) 4 19}
#endif
#ifdef HARD
{TROLL_GUARD (Troll Rocklobber) 8 18}
#endif
[ai]
# Avoid the spiders and the beginning area
[avoid]
x=2-9,2-27
y=11-15,30-35
[/avoid]
[/ai]
[/side]
# Monsters
[side]
side=5
team_name=monsters
gold=0
controller=ai
no_leader=yes
hidden=yes
income=-2
fog=yes
shroud=yes
# Generic Monsters
{GENERIC_UNIT () (Giant Rat) 14 29} {GUARDIAN}
{GENERIC_UNIT () (Giant Rat) 21 28} {GUARDIAN}
{GENERIC_UNIT () (Giant Rat) 24 34} {GUARDIAN}
{GENERIC_UNIT () (Giant Rat) 18 18} {GUARDIAN}
{GENERIC_UNIT () (Giant Rat) 22 5} {GUARDIAN}
{GENERIC_UNIT () (Vampire Bat) 29 26} {GUARDIAN}
{GENERIC_UNIT () (Vampire Bat) 26 31} {GUARDIAN}
{GENERIC_UNIT () (Vampire Bat) 19 32} {GUARDIAN}
{GENERIC_UNIT () (Vampire Bat) 19 23} {GUARDIAN}
{GENERIC_UNIT () (Vampire Bat) 18 13} {GUARDIAN}
{GENERIC_UNIT () (Vampire Bat) 18 34} {GUARDIAN}
{GENERIC_UNIT () (Giant Spider) 7 12} {GUARDIAN}
{GENERIC_UNIT () (Giant Spider) 8 13} {GUARDIAN}
{GENERIC_UNIT () (Giant Spider) 6 15} {GUARDIAN}
[/side]
# The Wose
[side]
side=6
color=black
team_name=monsters,trolls #so the trolls don't trigger the wose
gold=0
controller=null #so the wose doesn't move until discovered
no_leader=yes
hidden=yes
income=-2
fog=yes
shroud=yes
[unit]
type=Ancient Wose
x,y=7,21
id=Dumdumbadoom
name= _ "Dumdumbadoom"
[/unit]
[ai]
[goal]
name=target
[criteria]
side=1
[/criteria]
value=5
[/goal]
[/ai]
[/side]
[event]
name=prestart
[kill]
id=Malin Keshar
[/kill]
[unit]
id=Malin Keshar
name= _ "Malin Keshar"
type=Dark Mage
side=1
x,y=3,34
profile=portraits/malin_old-decay.png
canrecruit=yes
unrenamable=yes
hitpoints=9
facing=ne
[status]
poisoned=yes
[/status]
[/unit]
[/event]
[event]
name=start
{MOVE_UNIT (id=Malin Keshar) 5 32}
[redraw]
side=1
[/redraw]
{CREATE_ADVISOR}
[message]
role=advisor
message= _ "Master, you are gravely injured!"
[/message]
[message]
speaker=Malin Keshar
message= _ "I won’t go down like this, felled by an orc’s blade. I won’t see them defeat me!"
[/message]
[message]
role=advisor
message= _ "There is another way, master. Remember the book..."
[/message]
[message]
speaker=Malin Keshar
message= _ "Yes... yes. The orcs are too strong for me now, but once I have undergone the transformation they’ll begin to fall before me. And I will continue to hound them until the last one falls!"
[/message]
[message]
speaker=Malin Keshar
message= _ "Leave me now while I prepare."
[/message]
[message]
role=advisor
message= _ "Yes, master."
[/message]
{PUT_TO_RECALL_LIST (role=advisor)}
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "With his last bits of strength, Malin assembles an altar as the book instructs."
[/message]
[item]
x,y=6,31
image=misc/makeshift-altar.png
[/item]
[recall]
role=advisor
x,y=7,31
[/recall]
{MODIFY_UNIT role=advisor facing sw}
[delay]
time=500
[/delay]
{MOVE_UNIT (id=Malin Keshar) 6 31}
[message]
speaker=Malin Keshar
message= _ "I pray that I am strong enough to complete the spell."
[/message]
[message]
speaker=Malin Keshar
message= _ "I’m ready. Do it."
[/message]
[animate_unit]
flag=attack
hits=yes
[filter]
role=advisor
[/filter]
[primary_attack]
range=melee
[/primary_attack]
[facing]
[filter]
id=Malin Keshar
[/filter]
[/facing]
[animate]
flag=defend
[filter]
id=Malin Keshar
[/filter]
hits=no
[facing]
[filter]
role=advisor
[/filter]
[/facing]
[/animate]
[/animate_unit]
[kill]
id=Malin Keshar
fire_event=no
animate=yes
[/kill]
{PUT_TO_RECALL_LIST (role=advisor)}
{FADE_TO_BLACK}
[redraw][/redraw]
[delay]
time=1000
[/delay]
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "There is darkness..."
[/message]
[delay]
time=1000
[/delay]
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "and peace..."
[/message]
[delay]
time=1000
[/delay]
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "for a moment."
[/message]
[delay]
time=1000
[/delay]
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "Then they are replaced by a pulling, a pain too strong to resist, and then..."
[/message]
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "by emptiness."
[/message]
{FADE_IN}
# And is reborn as a lich
[unit]
side=1
x,y=6,31
hitpoints=9
facing=se
animate=yes
# wmllint: recognize Mal Keshar
{CHARACTER_STATS_MAL_KESHAR}
[/unit]
[redraw][/redraw]
{INCIDENTAL_MUSIC the_dangerous_symphony.ogg}
[music]
name=knalgan_theme.ogg
append=yes
[/music]
[music]
name=heroes_rite.ogg
append=yes
[/music]
# He's not necessarily totally happy about this
[message]
speaker=Mal Keshar
sound=lich-die.ogg
message= _ "<big>AAAaaiiigghh!!</big>" # wmllint: no spellcheck
[/message]
[message]
speaker=Mal Keshar
message= _ "The cold, it burns!"
[/message]
[message]
speaker=Mal Keshar
message= _ "I need warmth... life... I sense some here!"
[/message]
[animate_unit]
flag=attack
hits=yes
[filter]
id=Mal Keshar
[/filter]
[primary_attack]
name=shadow wave
[/primary_attack]
[/animate_unit]
{QUAKE cave-in.ogg}
[item]
x,y=9,32
image=misc/blank-hex.png
# HACK: An item can't be removed after only one cycle, so set the blank hex at the end
halo="halo/undead/dark-magic-[1~6].png,misc/blank-hex.png:100000"
[/item]
[delay]
time=1000
[/delay]
[terrain]
x,y=10,31
terrain=Uh
[/terrain]
[remove_item]
x,y=10,31
[/remove_item]
# Previously recruited and new adepts can now also become liches
# To tranform them, all units from the recall list get copied
# and replaced by a new one with the changed type
[store_unit]
[filter]
type=Dark Adept DiD, Dark Sorcerer DiD
[/filter]
variable=mages
kill=yes
[/store_unit]
[for]
array=mages
variable=i
[do]
# Get the new type:
[switch]
variable=mages[$i].type
[case]
value=Dark Adept DiD
[set_variable]
name=new_type
value=Dark Adept
[/set_variable]
[/case]
[case]
value=Dark Sorcerer DiD
[set_variable]
name=new_type
value=Dark Sorcerer
[/set_variable]
[/case]
[/switch]
# Create a new mage with the same attributes as the old one:
[unit]
type=$new_type
max_experience=$mages[$i].max_experience
max_hitpoints=$mages[$i].max_hitpoints
experience=$mages[$i].experience
name=$mages[$i].name
id=$mages[$i].id
gender=$mages[$i].gender
side=1
placement=recall # The only place they can be at the moment.
[modifications]
[insert_tag]
name=trait
variable=mages[$i].modifications.trait[0]
[/insert_tag]
[insert_tag]
name=trait
variable=mages[$i].modifications.trait[1]
[/insert_tag]
[/modifications]
[/unit]
[/do]
[/for]
{CLEAR_VARIABLE mages,new_type}
[disallow_recruit]
side=1
type=Dark Adept DiD
[/disallow_recruit]
[allow_recruit]
side=1
type=Dark Adept
[/allow_recruit]
[objectives]
side=1
[objective]
condition=win
description= _ "Regain your strength"
[/objective]
[objective]
condition=lose
description= _ "Destruction of Mal Keshar"
[/objective]
[/objectives]
[/event]
# Ensure that you can't lose to the first couple of bats and rats simply by
# getting unlucky.
{FORCE_CHANCE_TO_HIT (id=Mal Keshar) side=5 100 (
[variable]
name=turn_number
less_than=5
[/variable]
)}
[event]
name=attacker_hits
id=lich_attacker
first_time_only=yes
[filter]
id=Mal Keshar
[/filter]
[filter_attack]
name=touch
[/filter_attack]
[message]
speaker=Mal Keshar
message= _ "Yes! I can draw energy even from these insignificant creatures."
[/message]
[remove_event]
id=lich_defender
[/remove_event]
[/event]
[event]
name=defender_hits
id=lich_defender
first_time_only=yes
[filter_second]
id=Mal Keshar
[/filter_second]
[filter_second_attack]
name=touch
[/filter_second_attack]
[message]
speaker=Mal Keshar
message= _ "Yes! I can draw energy even from these insignificant creatures."
[/message]
[remove_event]
id=lich_attacker
[/remove_event]
[/event]
[event]
# See your goal
name=moveto
[filter]
id=Mal Keshar
x=20-25
y=27-29
[/filter]
# See the road to the castle and the castle itself
[remove_shroud]
side=1
x=3-13,20-22,18-20,17-19,13-16,11-15
y=2-8,18-28,15-17,14-16,12-13,9-11
[/remove_shroud]
[redraw]
side=1
[/redraw]
[scroll_to]
x,y=8,5
[/scroll_to]
[delay]
time=2000
[/delay]
[message]
speaker=Mal Keshar
message= _ "There, in along this old road, I sense a place worthy of being my home. From there I will build my armies. But I am still too weak to clear the vermin from it. I must finish regaining my strength."
[/message]
[message]
speaker=Mal Keshar
message= _ "I will need a castle from which to call upon my soldiers. I sense one nearby."
[/message]
[remove_shroud]
side=1
x=27-32
y=23-27
[/remove_shroud]
[redraw]
side=1
[/redraw]
[scroll_to]
x,y=34,24
[/scroll_to]
[delay]
time=1500
[/delay]
[message]
speaker=Mal Keshar
message= _ "Yes, this will do until I can take my new home."
[/message]
# Turns are measured from here
[modify_turns]
value="$($turn_number + 50)"
[/modify_turns]
[objectives]
side=1
[objective]
condition=win
description= _ "Clear your new home of trolls"
[/objective]
[objective]
condition=lose
description= _ "Destruction of Mal Keshar"
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
[/event]
# Set the troll enemy and return income to normal when you reach your keep
[event]
name=moveto
[filter]
id=Mal Keshar
x,y=30,25
[/filter]
# Troll leader
[unit]
type=Troll Hero
side=2
id=Grnknrr
x,y=10,6
canrecruit=yes
facing=se
[/unit]
[modify_side]
side=2
income=0
[/modify_side]
{MODIFY_UNIT side=2 upkeep full}
[capture_village]
side=2
x=1-13
y=1-10
[/capture_village]
[modify_side]
side=1
income=0
[/modify_side]
[/event]
# Fun with the wose
[event]
name=enter_hex # handles transition from great tree to wose better than moveto
[filter]
side=1
[filter_adjacent]
id=Dumdumbadoom
[/filter_adjacent]
[/filter]
[terrain]
x,y=7,21
terrain=Gg
[/terrain]
[message]
speaker=Dumdumbadoom
message= _ "Who has awoken me from my slumber? Undead? I shall not suffer the existence of such foul creatures!"
[/message]
[modify_side]
side=6
controller=ai
team_name=monsters
[/modify_side]
[/event]
#ifdef __UNUSED__
# Have a nice trip, see you in the fall. . .
[event]
name=moveto
first_time_only=no
[filter]
x,y=24,13
[not]
type=Vampire Bat,Blood Bat,Dread Bat,Ghost,Wraith,Spectre,Shadow,Nightgaunt
[/not]
[/filter]
[message]
x,y=24,13
message= _ "<big>AAAaaaggghhhh!! ...</big>" # wmllint: no spellcheck
[/message]
{MOVE_UNIT (x,y=24,13) 25 13}
[kill]
x,y=25,13
animate=no
fire_event=yes
[/kill]
[/event]
#endif
# Victory Condition
[event]
# Kill the troll leader
name=die
[filter]
side=2
canrecruit=yes
[/filter]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/event]
[event]
name=victory
{VARIABLE timesForever 0}
[/event]
{HERODEATH_MALIN_LICH}
[/scenario]
#undef TROLL_GUARD