-
-
Notifications
You must be signed in to change notification settings - Fork 988
/
13_The_Dwarven_Doors.cfg
783 lines (719 loc) · 23.4 KB
/
13_The_Dwarven_Doors.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
#textdomain wesnoth-httt
[scenario]
id=13_The_Dwarven_Doors
name= _ "The Dwarven Doors"
map_data="{campaigns/Heir_To_The_Throne/maps/13_The_Dwarven_Doors.map}"
{TURNS 26 20 15}
victory_when_enemies_defeated=no
{DEFAULT_SCHEDULE_DUSK}
next_scenario=14_Plunging_into_the_Darkness
{SCENARIO_MUSIC "battle.ogg"}
{EXTRA_SCENARIO_MUSIC "the_dangerous_symphony.ogg"}
{EXTRA_SCENARIO_MUSIC "legends_of_the_north.ogg"}
{EXTRA_SCENARIO_MUSIC "northern_mountains.ogg"}
{EXTRA_SCENARIO_MUSIC "casualties_of_war.ogg"}
{EXTRA_SCENARIO_MUSIC "battle-epic.ogg"}
{EXTRA_SCENARIO_MUSIC "the_city_falls.ogg"}
{HTTT_TRACK {JOURNEY_13_NEW} }
[event]
name=prestart
[objectives]
side=1
[objective]
description= _ "Move Konrad to the entrance of the dwarven tunnels"
condition=win
[/objective]
[objective]
description= _ "Death of Konrad"
condition=lose
[/objective]
[objective]
description= _ "Death of Delfador"
condition=lose
[/objective]
[objective]
description= _ "Death of Kalenz"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
[/event]
{PLACE_IMAGE scenery/dwarven-doors-closed.png 14 3}
{PLACE_IMAGE scenery/mine-abandoned.png 25 2}
[side]
type=Commander
id=Konrad
name= _ "Konrad"
unrenamable=yes
profile=portraits/konrad-human.png
side=1
canrecruit=yes
team_name=elves
user_team_name=_"Rebels"
controller=human
gold=200
{FLAG_VARIANT long}
[/side]
[side]
type=Orcish Slurbow
id=Knafa-Telfar
name= _ "Knafa-Telfar"
side=2
canrecruit=yes
recruit=Troll Whelp,Orcish Grunt,Orcish Crossbowman
{GOLD 100 120 140}
{INCOME 14 18 22}
[ai]
{ATTACK_DEPTH 4 5 5}
aggression=1.0
grouping=no
caution=-5.0
[/ai]
team_name=orcs
user_team_name=_"Orcs"
{FLAG_VARIANT6 ragged}
[/side]
[side]
type=Orcish Warlord
id=Urug-Tan
name= _ "Urug-Tan"
side=3
canrecruit=yes
recruit=Troll Whelp,Orcish Grunt,Orcish Crossbowman
{GOLD 75 95 115}
{INCOME 12 14 18}
[ai]
{ATTACK_DEPTH 4 5 5}
aggression=1.0
grouping=no
caution=-5.0
[/ai]
team_name=orcs
user_team_name=_"Orcs"
{FLAG_VARIANT6 ragged}
[/side]
[side]
type=Orcish Sovereign
id=Shuuga-Mool
name= _ "Shuuga-Mool"
side=4
canrecruit=yes
recruit=Orcish Grunt,Wolf Rider,Orcish Archer,Troll
{GOLD 30 50 70}
{INCOME 12 14 18}
team_name=orcs
user_team_name=_"Orcs"
[ai]
{ATTACK_DEPTH 4 5 5}
aggression=1.0
grouping=no
caution=-5.0
[/ai]
{FLAG_VARIANT6 ragged}
[/side]
[side]
side=5
no_leader=yes
controller=ai
hidden=yes
[/side]
{STARTING_VILLAGES 2 20}
{STARTING_VILLAGES 3 20}
{STARTING_VILLAGES 4 20}
[label]
x=15
y=21
text= _ "Pillars of Thunedain"
[/label]
[label]
x=14
y=4
text= _ "The Great Doors"
[/label]
#define LISAR_GUARD_DOORS
{NAMED_LOYAL_UNIT 2 (Royal Guard) 8 44 () ( _ "Royal Guard")}
#enddef
[event]
name=prestart
#
# Randomly set the exit location - 1=the main door and 2=the mine
#
{VARIABLE_OP true_entrance_location rand "1..2"}
[lua]
code=<<
-- The only parameter right now is the coverage (real 0.0 to 1.0, incl.)
-- For prime-time use the filter terrain needs to come in and the convert
-- table needs to be VERY complete. Or, rename this to morph_terrain and
-- have the conversion table come in as an argument, too.
local locations = wesnoth.get_locations{terrain = 'Ce,Ch,Chr,Co,Gd,Gd^Vc,Gd^Vh,Gd^Vo,Gll^Fp,Hhd,Hhd^Fp,Hhd^Vo,Ke,Khr,Ko,Md,Mm,Rd,Re,Re^Vo,Rr,Ww'}
local coverage = wml.variables.snowCoverage
if coverage == nil or coverage < 0 then
coverage = 0
elseif coverage > 1 then
coverage = 1
end
local snowNeeded = (#locations * coverage) / 3
-- Use 1/3rd of the coverage from Northern Winter. Spring is approaching. We need to watch
-- this; if it adds too much snow, the player may not be able to make it to the exit in time.
local convert = {
['Ce'] = 'Cea',
['Ch'] = 'Cha',
['Chr'] = 'Cha',
['Co'] = 'Coa',
['Gd'] = 'Aa',
['Gd^Vc'] = 'Aa^Vca',
['Gd^Vh'] = 'Aa^Vha',
['Gd^Vo'] = 'Aa^Voa',
['Gll^Fp'] = 'Aa^Fpa',
['Hhd'] = 'Ha',
['Hhd^Fp'] = 'Ha^Fpa',
['Hhd^Vo'] = 'Ha^Voa',
['Ke'] = 'Kea',
['Khr'] = 'Kha',
['Ko'] = 'Koa',
['Md'] = 'Ms',
['Mm'] = 'Ms',
['Rd'] = 'Aa',
['Re'] = 'Aa',
['Re^Vo'] = 'Aa^Voa',
['Rr'] = 'Aa',
['Ww'] = 'Ai'
}
local loopCounter
for loopCounter = 1, snowNeeded do
local locationsIndex = wesnoth.random(#locations)
local coordinate = locations[locationsIndex]
local terrainCode = wesnoth.get_terrain(coordinate[1], coordinate[2])
wesnoth.set_terrain(coordinate[1], coordinate[2], (convert[terrainCode] or terrainCode))
table.remove(locations, locationsIndex)
end
>>
[/lua]
[/event]
[event]
name=prestart
{NEED_DELFADOR placement=leader}
{NEED_KALENZ placement=leader}
{STORE_LISAR}
[recall]
id=Haldiel
[/recall]
[role] #If Haldiel was just recalled, this will select him.
role=Rider
[auto_recall][/auto_recall]
type="Elvish Outrider," +
"Paladin,Grand Knight," +
"Elvish Rider," +
"Knight,Lancer," +
"Elvish Scout," +
"Horseman"
[else]
[unit]
side=1
type=Horseman
role=Rider
placement=leader
[/unit]
[/else]
[/role]
[recall]
id=Delurin
[/recall]
[role] # If Delurin was just recalled, this will select him.
role=Outlaw_Advisor
[auto_recall][/auto_recall]
type="Highwayman,Fugitive,Huntsman,Ranger," +
"Bandit,Outlaw,Trapper," +
"Thug,Footpad,Poacher"
[/role]
[/event]
[event]
name=start
[message]
speaker=Delfador
message= _ "At last, this is the entrance to the dwarven tunnels."
[/message]
[message]
speaker=Konrad
message= _ "All I can see are ruins and poor villages."
[/message]
[message]
speaker=Kalenz
message= _ "The poor villagers that once lived here and traded with the dwarves are now held in slavery by the orcs."
[/message]
[message]
speaker=Konrad
message= _ "Slaves to the evil orcs? We must liberate them!"
[/message]
[message]
speaker=Delfador
{DELFADOR_MENTORING}
message= _ "That would not be a wise choice, for our mission is to retrieve the Sceptre of Fire. If we tarry in this place, hordes of orcs will surround us."
[/message]
[message]
speaker=Kalenz
message= _ "Konrad, heed the words of Delfador. We shall return to wrest the grip of the orcs from these lands. Look — orcs are already gathering. More are surely on their way."
[/message]
[message]
speaker=Konrad
message= _ "This does not please me, but I will listen to your advice."
[/message]
[message]
role=Rider
message= _ "Sir, I should like to scout out the path ahead. It would be disaster for us to find these doors sealed, leaving us as hunting fodder for the gathering horde."
[/message]
[message]
speaker=Delfador
message= _ "Excellent. We must find a way underground before we are overwhelmed."
[/message]
#
# If you have outlaws in your party, you have the chance to
# find a special unit
#
[if]
[have_unit]
role=Outlaw_Advisor
[/have_unit]
[then]
[store_unit]
[filter]
role=Outlaw_Advisor
[/filter]
kill=no
variable=outlaw_advisor_store
[/store_unit]
{VARIABLE outlaw_name $outlaw_advisor_store.name}
[message]
role=Outlaw_Advisor
message= _ "My uncle used to smuggle... err... I mean... trade food for the dwarves. He could get grain carts in under the very noses of those ugly orcs."
[/message]
[message]
role=Outlaw_Advisor
message= _ "He must be hiding in one of those villages."
[/message]
[/then]
[/if]
[/event]
#
# Some colorful talking events to make the scenario more interesting
#
[event]
name=turn 2
[message]
speaker=Konrad
message= _ "The defense of the dwarves must have been strong. Look at those ruined towers!"
[/message]
[message]
speaker=Delfador
message= _ "The battle outside was fierce and lasted a full half-year. But, the battles inside the tunnels were worse."
[/message]
[/event]
[event]
name=moveto
[filter]
id=Delfador
x=11-19
y=19-22
[/filter]
[message]
speaker=Delfador
{DELFADOR_MENTORING}
# wmllint: local spelling Thunedain
message= _ "The pillars of Thunedain. He was a legendary dwarvish lord who made his last stand here. May we triumph where he fell."
[/message]
[message]
speaker=Kalenz
message= _ "I would settle for escape, though I know not which I dread more: foul orcs or fetid caves."
[/message]
[allow_undo][/allow_undo]
[/event]
[event]
name=die
[filter]
side=2,3,4
[/filter]
[filter_second]
side=1
id=Haldiel,Simyr
[or]
type=Paladin
[/or]
[/filter_second]
[message]
speaker=second_unit
message= _ "Back to the abyss, spawn of filth!"
[/message]
[/event]
#
# Finding the bandit uncle who gives you a big hint about the true exit
#
[event]
name=moveto
[filter]
side=1
x=18
y=24
[/filter]
[if]
[have_unit]
role=Outlaw_Advisor
[/have_unit]
[then]
{NAMED_LOYAL_UNIT 1 (Bandit) 18 24 (Uncle Somf) ( _ "Uncle Somf")}
[message]
speaker=unit
message= _ "Who... who’s here?"
[/message]
#
# The bandit's speech depends on who finds him
#
[if]
[have_unit]
role=Outlaw_Advisor
x,y=18,24
[/have_unit]
# the outlaw advisor finds Uncle Somf
[then]
[message]
speaker=Uncle Somf
# po: The addressed person is the speaker's niece or nephew.
message= _ "$outlaw_name|! How have you been? I haven’t seen you in years."
[/message]
[/then]
# ...or someone else finds him
[else]
[message]
speaker=Uncle Somf
# po: The mentioned person, $outlaw_name, is the speaker's niece or nephew.
message= _ "Haw! Any friend of $outlaw_name is a friend of mine too."
[/message]
[/else]
[/if]
[message]
speaker=Konrad
message= _ "We need to make it into the caves of the dwarves."
[/message]
#
# The bandit divulges the true location of the entrance
#
[if]
[variable]
name=true_entrance_location
numerical_equals=1
[/variable]
[then]
[message]
speaker=Uncle Somf
message= _ "The mine entrances were all collapsed intentionally during the fighting. The doors, while heavily defended, remain accessible. The orcish hordes that assault them are repulsed, but you may be able to sneak in unnoticed."
[/message]
[/then]
[else]
[message]
speaker=Uncle Somf
message= _ "The best way is through the mine tunnels. The orcs have never found all the mine entrances, and many still lead deep underground."
[/message]
[/else]
[/if]
[/then]
[else]
[allow_undo][/allow_undo]
[/else]
[/if]
[/event]
[event]
name=moveto
[filter]
id=Uncle Somf
[filter_adjacent]
role=Outlaw_Advisor
[/filter_adjacent]
[or]
role=Outlaw_Advisor
[filter_adjacent]
id=Uncle Somf
[/filter_adjacent]
[/or]
[/filter]
[message]
speaker=Uncle Somf
# po: The addressed person is the speaker's niece or nephew.
message= _ "How are we doing, $outlaw_name|?"
[/message]
[message]
speaker=$outlaw_advisor_store.id
message= _ "The same as always, Uncle!"
[/message]
[message]
speaker=Uncle Somf
message= _ "That bad, huh?"
[/message]
[allow_undo][/allow_undo]
[/event]
#
# When any side 1 unit reaches a possible exit, we find out if it
# is the correct one. We don't know who will reach the exit,
# so the dialog must be general for anyone.
# If the unit is Konrad, the victory event is handled separately.
#
[event]
name=moveto
first_time_only=yes
[filter]
side=1
x=14
y=3
[/filter]
#
# If true_entrance_location = 1 then this is the true entrance
#
[if]
[variable]
name=true_entrance_location
numerical_equals=1
[/variable]
[then]
[message]
speaker=unit
message= _ "The doors... they can be moved!"
[/message]
[message]
speaker=Delfador
message= _ "Quickly, now, let us slip inside and hope the dwarves do not object..."
[/message]
[message]
speaker=Kalenz
message= _ "... and that the orcs do not follow."
[/message]
[/then]
[else]
[message]
speaker=unit
message= _ "The doors are closed and barred from the inside!"
[/message]
[message]
speaker=Konrad
{KONRAD_VARIATION concerned}
message= _ "We can’t get in! What should we do now?"
[/message]
[message]
speaker=Kalenz
message= _ "It is said that the orcs used old mine tunnels to surprise the dwarves. There appears to be one nearby, to the north-east."
[/message]
[message]
speaker=Konrad
message= _ "Then we must make it to that tunnel!"
[/message]
[/else]
[/if]
[/event]
[event]
name=moveto
[filter]
side=1
x=25
y=2
[/filter]
#
# If true_entrance_location = 2 then this is the true entrance
#
[if]
[variable]
name=true_entrance_location
numerical_equals=2
[/variable]
[then]
[message]
speaker=unit
message= _ "This old mine seems to be connected to the main tunnels."
[/message]
[message]
speaker=Kalenz
message= _ "I am hesitant to enter. It will be so difficult in the darkness!"
[/message]
[message]
speaker=Delfador
{DELFADOR_VARIATION mad}
message= _ "There is no time for idle chatter or delay of any kind. Onward!"
[/message]
[/then]
[else]
[message]
speaker=unit
message= _ "I have reached the mine entrance, but there is no tunnel here. Rock and rubble completely block the way."
[/message]
[message]
speaker=Konrad
message= _ "I hope we can make it through the main doors, then."
[/message]
[message]
speaker=Delfador
message= _ "It is our only choice now. Hurry!"
[/message]
[/else]
[/if]
[/event]
#
# These events end the level when Konrad makes it to the correct location.
# This has to be a separate event from when any side 1 unit first reaches
# a possible exit (the above events).
#
[event]
name=moveto
first_time_only=no
[filter]
id=Konrad
x=14
y=3
[/filter]
[if]
[variable]
name=true_entrance_location
numerical_equals=1
[/variable]
[then]
[message]
speaker=Konrad
message= _ "Pray that we live to see sunlight again."
[/message]
[fire_event]
name=victory dance
[/fire_event]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/then]
[/if]
[/event]
[event]
name=moveto
first_time_only=no
[filter]
id=Konrad
x=25
y=2
[/filter]
[if]
[variable]
name=true_entrance_location
numerical_equals=2
[/variable]
[then]
[message]
speaker=Konrad
message= _ "Pray that we live to see sunlight again."
[/message]
[fire_event]
name=victory dance
[/fire_event]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/then]
[/if]
[/event]
[event]
name=enemies defeated
[message]
speaker=Kalenz
message= _ "We have defeated the foul orcs guarding this land, but we must continue without rest. More will surely come!"
[/message]
[if]
[variable]
name=true_entrance_location
numerical_equals=1
[/variable]
[then]
[message]
speaker=Delfador
message= _ "Indeed we must not delay. Let us breach the great doors to the dwarven kingdom."
[/message]
[/then]
[else]
[message]
speaker=Delfador
message= _ "Indeed we must not delay. The mines in the northeast are the best way to enter."
[/message]
[/else]
[/if]
[/event]
[event]
name=moveto
[filter]
side=1
x=10-15
y=10-15
[/filter]
{NAMED_LOYAL_UNIT 5 (Cuttle Fish) 13 13 (Cuttle Fish) ( _ "Cuttle Fish")}
[message]
speaker=Cuttle Fish
message= _ "Ruarrrrr!!!" # wmllint: no spellcheck
[/message]
[message]
speaker=unit
message= _ "A monster was hiding in that lake!"
[/message]
[role]
type="Thief," +
"Poacher,Footpad,Thug," +
"Horseman," +
"Elvish Scout,Elvish Archer,Elvish Fighter," +
"Fighter," +
"Rogue," +
"Trapper,Outlaw,Bandit," +
"Lancer,Knight," +
"Elvish Rider,Elvish Marksman,Elvish Ranger,Elvish Hero,Elvish Captain," +
"Elvish Lord," +
"Commander," +
"Assassin," +
"Ranger,Huntsman,Fugitive,Highwayman," +
"Grand Knight,Paladin," +
"Elvish Outrider,Elvish Sharpshooter,Elvish Avenger,Elvish Champion,Elvish Marshal," +
"Elvish High Lord," +
"Lord"
role=whiner
[/role]
[message]
role=whiner
message= _ "The legend was true! There are always tentacled creatures hiding in the lakes near the dwarven tunnels."
[/message]
[/event]
[event]
name=victory dance
[message]
speaker=narrator
image="wesnoth-icon.png"
message= _ "But Konrad’s party was not alone in entering the caves..."
[/message]
{NAMED_LOYAL_UNIT 2 (Princess) 8 44 (Li'sar) ( _ "Li’sar")}
[+unit]
profile=portraits/lisar.png
[/unit]
{LISAR_GUARD_DOORS}
{LISAR_GUARD_DOORS}
{LISAR_GUARD_DOORS}
{LISAR_GUARD_DOORS}
{LISAR_GUARD_DOORS}
{LISAR_GUARD_DOORS}
[message]
speaker="Li'sar"
message= _ "Whew! We make our way through the dangerous fog of the mountains, and now there is all this chaos before us! Come on, men! We must make it to the caves that lie ahead of us!"
[/message]
[/event]
[event]
name=victory
{CLEAR_VARIABLE true_entrance_location}
{CLEAR_VARIABLE outlaw_advisor_store}
{CLEAR_VARIABLE outlaw_name}
{RESTORE_LISAR}
[/event]
{campaigns/Heir_To_The_Throne/utils/deaths.cfg}
[/scenario]
#undef LISAR_GUARD_DOORS