/
11_Descent_into_Darkness.cfg
744 lines (649 loc) · 19.7 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
#textdomain wesnoth-did
[scenario]
id=11_Descent_into_Darkness
next_scenario=12_Endless_Night
name=_ "Descent into Darkness"
map_data="{campaigns/Descent_Into_Darkness/maps/11_Descent_into_Darkness.map}"
turns=-1
{INTRO_AND_SCENARIO_MUSIC the_city_falls.ogg the_deep_path.ogg}
{EXTRA_SCENARIO_MUSIC the_king_is_dead.ogg}
{EXTRA_SCENARIO_MUSIC revelation.ogg}
victory_when_enemies_defeated=no
[story]
[part]
story=_ "<i>“To become a lich, one must first die.”</i>"
background=story/book.jpg
scale_background=no
[/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>"
background=story/book.jpg
scale_background=no
[/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."
background=story/travel.jpg
scale_background=no
[/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."
background=story/end.jpg
scale_background=no
[/part]
[/story]
{BIGMAP_11}
{UNDERGROUND}
[side]
side=1
controller=human
type=Apprentice Mage
id=Malin Keshar
name=_ "Malin Keshar"
profile=portraits/malin_old-decay.png
unrenamable=yes
canrecruit=yes
recruit=Walking Corpse,Vampire Bat,Ghost,Ghoul,Skeleton Archer,Skeleton,Dark Adept DiD
income=-2
gold=100
fog=yes
shroud=yes
{FLAG_VARIANT undead}
[/side]
[side]
# Troll leader
side=2
team_name=trolls
user_team_name=_"Trolls"
controller=ai
# place leader later
no_leader=yes
income=-2
gold=60
recruit=Troll Whelp,Troll,Troll Rocklobber,Troll Warrior,Troll Shaman
[ai]
caution=0.5
grouping=defensive
[goal]
name=protect_unit
[criteria]
side=2
canrecruit=yes
[/criteria]
value=10
[/goal]
recruitment_pattern=fighter,fighter,mixed fighter
# Avoid the spiders, the wose, and the beginning area
[avoid]
x=2-9,2-27,5-9
y=11-15,30-35,19-23
[/avoid]
[/ai]
fog=yes
shroud=no
[/side]
[side]
# Eastern village trolls
side=3
team_name=trolls
user_team_name=_"Trolls"
controller=ai
no_leader=yes
income=-2
gold=0
[ai]
# Avoid the spiders, the wose, and the beginning area
[avoid]
x=2-9,2-27,5-9
y=11-15,30-35,19-23
[/avoid]
[/ai]
fog=yes
shroud=no
[/side]
[side]
# Western village trolls
side=4
team_name=trolls
user_team_name=_"Trolls"
controller=ai
no_leader=yes
income=-2
gold=0
[ai]
# Avoid the spiders, the wose, and the beginning area
[avoid]
x=2-9,2-27,5-9
y=11-15,30-35,19-23
[/avoid]
[/ai]
fog=yes
shroud=no
[/side]
[side]
# Monsters
side=5
controller=ai
no_leader=yes
income=-2
gold=0
[ai]
# This is mostly for the Wose -- the others are guardians
[goal]
name=target
[criteria]
side=1
[/criteria]
value=5
[/goal]
[/ai]
fog=yes
shroud=yes
[/side]
[event]
name=prestart
[if]
[have_unit]
id=Malin Keshar
[and]
type=Apprentice Necromancer
[or]
type=Apprentice Mage
[/or]
[/and]
[/have_unit]
[then]
[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
unrenamable=yes
canrecruit=yes
[/unit]
[/then]
[/if]
[store_unit]
[filter]
id=Malin Keshar
[/filter]
kill=yes
variable=stored_Malin
[/store_unit]
# Malin starts injured and poisoned
{VARIABLE stored_Malin.hitpoints 9}
{VARIABLE stored_Malin.status.poisoned yes}
[unstore_unit]
variable=stored_Malin
[/unstore_unit]
{CLEAR_VARIABLE stored_Malin}
# Castle trolls - all difficulties
{UNIT 2 (Troll) 14 7 (ai_special=guardian)}
{UNIT 2 (Troll) 8 7 (ai_special=guardian)}
{UNIT 2 (Troll) 16 3 (ai_special=guardian)}
{UNIT 2 (Troll Rocklobber) 12 1 (ai_special=guardian)}
{UNIT 2 (Troll Shaman) 7 4 (ai_special=guardian)}
# Eastern village trolls - all difficulties
{UNIT 3 (Troll) 30 19 (ai_special=guardian)}
{UNIT 3 (Troll) 31 12 (ai_special=guardian)}
{UNIT 3 (Troll Shaman) 33 14 (ai_special=guardian)}
# Western village trolls - all difficulties
{UNIT 4 (Troll Shaman) 4 21 (ai_special=guardian)}
{UNIT 4 (Troll) 10 26 (ai_special=guardian)}
{UNIT 4 (Troll Whelp) 2 25 (ai_special=guardian)}
{UNIT 4 (Troll) 10 16 (ai_special=guardian)}
# Monsters
{UNIT 5 (Giant Rat) 14 29 (ai_special=guardian)}
{UNIT 5 (Giant Rat) 21 28 (ai_special=guardian)}
{UNIT 5 (Giant Rat) 24 34 (ai_special=guardian)}
{UNIT 5 (Giant Rat) 18 18 (ai_special=guardian)}
{UNIT 5 (Giant Rat) 22 5 (ai_special=guardian)}
{UNIT 5 (Vampire Bat) 29 26 (ai_special=guardian)}
{UNIT 5 (Vampire Bat) 26 31 (ai_special=guardian)}
{UNIT 5 (Vampire Bat) 19 32 (ai_special=guardian)}
{UNIT 5 (Vampire Bat) 19 23 (ai_special=guardian)}
{UNIT 5 (Vampire Bat) 18 13 (ai_special=guardian)}
{UNIT 5 (Vampire Bat) 18 34 (ai_special=guardian)}
{UNIT 5 (Giant Spider) 7 12 (ai_special=guardian)}
{UNIT 5 (Giant Spider) 8 13 (ai_special=guardian)}
{UNIT 5 (Giant Spider) 6 15 (ai_special=guardian)}
#ifdef NORMAL
{UNIT 2 (Troll) 7 7 (ai_special=guardian)}
{UNIT 4 (Troll Whelp) 4 19 (ai_special=guardian)}
{UNIT 3 (Troll Whelp) 31 16 (ai_special=guardian)}
#endif
#ifdef HARD
{UNIT 2 (Troll) 7 7 (ai_special=guardian)}
{UNIT 4 (Troll Rocklobber) 8 18 (ai_special=guardian)}
{UNIT 3 (Troll Rocklobber) 27 16 (ai_special=guardian)}
#endif
# The wose
[unit]
type=Ancient Wose
side=5
x,y=7,21
id=Dumdumbadoom
name= _"Dumdumbadoom"
ai_special=guardian
[/unit]
{MODIFY_UNIT side=2,3,4,5 upkeep loyal}
[/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
message=_ "With his last bits of strength, Malin assembles an altar as the book instructs."
image=wesnoth-icon.png
[/message]
[item]
x,y=6,31
image=misc/makeshift-altar.png
[/item]
[recall]
role=advisor
x,y=7,31
[/recall]
[delay]
time=500
[/delay]
{MOVE_UNIT (id=Malin Keshar) 6 31}
{MODIFY_UNIT role=advisor facing sw}
[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 1000}
[message]
speaker=narrator
message=_ "There is darkness..."
image=wesnoth-icon.png
[/message]
[message]
speaker=narrator
message=_ "and peace..."
image=wesnoth-icon.png
[/message]
[message]
speaker=narrator
message=_ "for a moment."
image=wesnoth-icon.png
[/message]
{DELAY 500}
[message]
speaker=narrator
message=_ "Then they are replaced by a pulling, a pain too strong to resist, and then..."
image=wesnoth-icon.png
[/message]
[message]
speaker=narrator
message=_ "by emptiness."
image=wesnoth-icon.png
[/message]
{FADE_IN}
# and is reborn as a lich
[unit]
type=Lich DiD
side=1
id=Mal Keshar
name=_ "Mal Keshar"
unrenamable=yes
canrecruit=yes
profile=portraits/malin_lich.png
x,y=6,31
hitpoints=9
facing=se
animate=yes
[/unit]
[redraw]
[/redraw]
# He's not necessarilly totally happy about this
[message]
speaker=Mal Keshar
message=_ "<big>AAAaaiiigghh!!</big>" # wmllint: no spellcheck
sound=lich-die.ogg
[/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]
range=ranged
[/primary_attack]
[facing]
[filter_adjacent_location]
[filter]
id=Malin Keshar
[/filter]
adjacent=nw
[/filter_adjacent_location]
[/facing]
[/animate_unit]
# Blow open a wall
[move_unit_fake]
type=Iceball
side=1
x=6,10
y=31,31
[/move_unit_fake]
{QUAKE "cave-in.ogg"}
[terrain]
x,y=10,31
terrain=Uh
[/terrain]
{INCIDENTAL_MUSIC the_dangerous_symphony.ogg}
[music]
name=knalgan_theme.ogg
append=yes
[/music]
[music]
name=heroes_rite.ogg
append=yes
[/music]
[objectives]
side=1
[objective]
condition=win
description=_ "Regain your strength"
[/objective]
[objective]
condition=lose
description=_ "Destruction of Mal Keshar"
[/objective]
[/objectives]
# Previously recruited and new adepts can now also become liches
{MODIFY_UNIT (type=Dark Adept DiD) advances_to (Dark Sorcerer)}
{MODIFY_UNIT (type=Dark Sorcerer DiD) advances_to (Lich,Necromancer)}
[disallow_recruit]
side=1
type=Dark Adept DiD
[/disallow_recruit]
[allow_recruit]
side=1
type=Dark Adept
[/allow_recruit]
[/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
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]
[/event]
[event]
# See your goal
name=moveto
[filter]
id=Mal Keshar
x=20-25
y=27-29
[/filter]
[remove_shroud]
# See the road to the castle and the castle itself
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 2000}
[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 1500}
[message]
speaker=Mal Keshar
message=_ "Yes, this will do until I can take my new home."
[/message]
[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]
# Turns are measured from here
{VARIABLE totalTurns 50}
{VARIABLE_OP totalTurns add $turn_number}
[modify_turns]
value=$totalTurns
[/modify_turns]
{CLEAR_VARIABLE totalTurns}
[/event]
[event]
# Set the troll enemy and return income to normal when you reach your keep
name=moveto
[filter]
id=Mal Keshar
x,y=30,25
[/filter]
[unit]
# Troll leader
type=Troll Hero
side=2
id=Grnknrr
x,y=10,6
canrecruit=yes
[/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]
[event]
name=turn refresh
first_time_only=no
[if]
[variable]
name=side_number
equals=5
[/variable]
[variable]
name=wose_awakened
not_equals=yes
[/variable]
[then]
{MODIFY_UNIT id=Dumdumbadoom moves 0}
[/then]
[/if]
[/event]
[event]
# Fun with the wose
name=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]
{VARIABLE wose_awakened yes}
[/event]
#ifdef __UNUSED__
[event]
# Have a nice trip, see you in the fall. . .
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
# Defeat Conditions
{MAL_DEATH}
# 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 1}
[/event]
[/scenario]