-
-
Notifications
You must be signed in to change notification settings - Fork 988
/
01_Invasion.cfg
647 lines (561 loc) · 21.3 KB
/
01_Invasion.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
#textdomain wesnoth-dw
# I think the key to this scenario is "Control the villages!" You get
# a bunch of free citizens, so send them all directions and take as
# many villages as possible right away. Recruit two level ones
# (fighters or hunters) and the rest citizens this turn. Send those
# two and two or three citizens straight south to get in a battle over
# the group of villages there. Try not to lose the level one units,
# but more importantly, don't let any bats get by you! Another level
# one unit may be necessary in the lower middle of the map to keep the
# bats from getting by. Initiates are very effective at bat disposal,
# so use them. Send one more fighter or hunter and some citizens to
# hold the north-east corner villages. Don't worry about the land
# villages too much, but hold the ones in the water. Use Cylanna,
# Gwabbo, and a few citizens to just hold off the skeletons and
# soulless south east of your keep until the village situation is
# under control. When it is, bring in more units to help them. Attack
# during the day, but retreat and heal at night: You can't afford to
# have very many units zombified. Also, rotate your units and use the
# ZOC of Gwabbo and your level ones to shield your wounded. Fighters
# are the best for this because they can take some punishment. When
# the map starts to thin out, circle most units around to the enemy
# leader. Try to make some brawlers, and take Gwabbo's advice to get
# Krellis as much experience as possible.
# You can also just charge, and if you time it right, the leader should be poorly
# defended because all his units will be off taking villages. Maybe.
# The most complicated event here pops zombies out of villages taken by enemy
# units. There is also a fair bit of animation and story events. One
# event makes a black ghost rise from the corpse of the enemy leader
# and disappear under the mountain. There is also some action around a
# southern village.
[scenario]
name= _ "Invasion!"
map_data="{campaigns/Dead_Water/maps/Home_1.map}"
id=01_Invasion
next_scenario=02_Flight
[story]
[part]
{DW_BIGMAP}
story= _ "In the Far North, where the Mountains of Dorth approach the coast, lies a bay with a narrow mouth. In the calm waters of this bay lies the merfolk city of Jotha. The natural harbor and the prosperity of the dwellers within drew many envious eyes, but none could match the prowess of the merfolk in their aquatic domain. In most years, orcs from the port city of Tirigaz, further north, would raid against Jotha as predictably as the spring rains; always, they were driven back to dry land with heavy losses, the salt water of the bay stinging their wounds."
[/part]
[part]
{DW_BIGMAP}
story= _ "In 626 YW, Jotha was attacked by a larger raiding party than ever before. The king Kai Laudiss led his troops to repel the raiders. They were successful, but merfolk casualties were greater than usual. And numbered with the slain was the wife of Kai Laudiss. The kai’s grief was great, but his wrath was also fearsome to behold. He readied his army to follow the orcs. His stated purpose was not revenge, but the desire to secure the safety of Jotha with a demonstration of force that would teach the orcs to steer well clear of the merfolk. The merfolk army caught up with the orc band as it reached Tirigaz."
[/part]
[part]
{DW_BIGMAP}
story= _ "Under the cover of darkness, the mermen slid into the bay, intending to launch a surprise attack at dawn. But the orcs were prepared for this, and had hastily devised a surprise of their own. Ships at the mouth of the bay that had seemed but derelict hulks disgorged hordes of orcs. More of them poured forth from the city. The merfolk were trapped, and found themselves vastly outnumbered."
[/part]
[part]
{DW_BIGMAP}
story= _ "Kai Laudiss’s army fought fiercely, slaying five orcs for every warrior they lost. The kai himself fought with reckless abandon; foes fell with each swing of his great mace. The orcs discovered that trapped mermen were tougher than they had imagined, and found themselves fleeing into the forest to escape their vengeful spears. As the kai had intended, it was a defeat the orcs would not soon forget; but the cost was heavy. Kai Laudiss was felled by a poisoned orcish dart, and the greater part of his army was destroyed. When the remaining soldiers returned to Jotha, Krellis, the young son of Kai Laudiss, learned that he had become kai."
[/part]
[part]
{DW_BIGMAP}
story= _ "Kai Krellis felt too young for the responsibilities of a kingdom, so he relied on the wisdom of a priestess named Cylanna. She had been a friend of his father, and he had known her as long as he could remember. Cylanna mourned the former kai, but believed that his sacrifice would allow Krellis to preside over an age of peace. Unfortunately, that was not to be. A new enemy appeared from under the mountains."
[/part]
[/story]
{DW_TRACK {JOURNEY_01_NEW} }
{DEFAULT_SCHEDULE}
{TURNS4 30 28 26 26}
[side]
# wmllint: who SIDE_1 is Kai Krellis
{SIDE_1}
{GOLD4 110 110 130 130}
[/side]
[side]
side=2
controller=ai
user_team_name= _ "Undead Forces"
team_name="bad guys"
color=teal
type="Dark Sorcerer"
id="Mal-Kevek"
name= _ "Mal-Kevek"
canrecruit=yes
{FLAG_VARIANT undead}
#ifdef EASY
recruit="Walking Corpse, Vampire Bat, Skeleton Archer, Skeleton"
[ai]
recruitment_pattern=fighter,fighter,archer,scout
[/ai]
#endif
#ifdef NORMAL
recruit="Walking Corpse, Soulless, Vampire Bat, Skeleton Archer, Skeleton"
[ai]
recruitment_pattern=fighter,fighter,archer,scout
[/ai]
#endif
#ifdef HARD
recruit="Walking Corpse, Soulless, Vampire Bat, Blood Bat, Skeleton Archer, Skeleton"
[ai]
recruitment_pattern=fighter,fighter,archer,scout,scout
[/ai]
#endif
#ifdef NIGHTMARE
recruit="Walking Corpse, Soulless, Vampire Bat, Blood Bat, Skeleton Archer, Skeleton"
[ai]
recruitment_pattern=fighter,fighter,archer,scout,scout,scout
[/ai]
#endif
{GOLD4 120 160 210 250}
{INCOME4 0 2 4 6}
# It's not fair if the enemy leader goes into the mountains
# where the merfolk can't follow--even slowly We'll have the
# leader avoid the mountains.
[ai]
[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]
[/side]
{RECRUIT_UNIT_VARIATIONS 2 "Walking Corpse" swimmer}
{RECRUIT_UNIT_VARIATIONS 2 "Soulless" swimmer}
{LIMIT_RECRUITS 1 (Merman Hunter) 3}
{LIMIT_RECRUITS 1 (Merman Fighter) 3}
{LIMIT_RECRUITS 1 (Mermaid Initiate) 3}
#define PUT_CITIZEN X Y TRAIT_1_NAME TRAIT_2_NAME
[unit]
type=Merman Citizen
side=1
x={X}
y={Y}
# wmlscope: start ignoring
[modifications]
{TRAIT_{TRAIT_1_NAME}}
{TRAIT_{TRAIT_2_NAME}}
[/modifications]
# wmlscope: stop ignoring
generate_name=yes
[/unit]
#enddef
#define SET_VILLAGE_ZOMBIE_PATTERN N1_AMOUNT N2_AMOUNT N3_AMOUNT N4_AMOUNT N5_AMOUNT TYPE
[set_variables]
name=zombie_number_pattern
mode=replace
[value]
number={N1_AMOUNT}
[/value]
[value]
number={N2_AMOUNT}
[/value]
[value]
number={N3_AMOUNT}
[/value]
[value]
number={N4_AMOUNT}
[/value]
[value]
number={N5_AMOUNT}
[/value]
[/set_variables]
[set_variable]
name=zombie_type
value={TYPE}
[/set_variable]
#enddef
[event]
name=prestart
[music]
name=the_king_is_dead.ogg
[/music]
[music]
name=vengeful.ogg
append=yes
[/music]
[music]
name=legends_of_the_north.ogg
append=yes
[/music]
[objectives]
side=1
[objective]
description= _ "Defeat enemy leader"
condition=win
[/objective]
{HOW_TO_LOSE}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
{PUT_CITIZEN 19 6 INTELLIGENT STRONG}
{PUT_CITIZEN 21 6 STRONG RESILIENT}
{PUT_CITIZEN 14 9 QUICK INTELLIGENT}
{PUT_CITIZEN 26 9 RESILIENT QUICK}
{PUT_CITIZEN 19 13 STRONG QUICK}
{PUT_CITIZEN 21 13 RESILIENT INTELLIGENT}
[unit]
type=Mermaid Priestess
[modifications]
{TRAIT_LOYAL}
{TRAIT_RESILIENT}
[/modifications]
id=Cylanna
name= _ "Cylanna"
profile=portraits/cylanna.png
side=1
x=21
y=9
{IS_HERO}
unrenamable=yes
[/unit]
[set_variable]
name=number_of_captured_villages
value=0
[/set_variable]
#ifdef EASY
{SET_VILLAGE_ZOMBIE_PATTERN 1 1 1 2 1 (Walking Corpse)}
#endif
#ifdef NORMAL
{SET_VILLAGE_ZOMBIE_PATTERN 1 2 1 2 2 (Walking Corpse)}
#endif
#ifdef HARD
{SET_VILLAGE_ZOMBIE_PATTERN 2 2 2 2 2 (Soulless)}
#endif
#ifdef NIGHTMARE
{SET_VILLAGE_ZOMBIE_PATTERN 2 2 1 2 3 (Soulless)}
#endif
[/event]
#undef PUT_CITIZEN
#undef SET_VILLAGE_ZOMBIE_PATTERN
[event]
name=start
[message]
speaker=Kai Krellis
message= _ "Is something wrong, priestess?"
[/message]
[message]
speaker=Cylanna
message= _ "Maybe. I smell death and decay."
[/message]
[scroll_to]
x=34
y=23
[/scroll_to]
[unit]
type=Skeleton
side=2
x=34
y=23
animate=yes
id=fiend
[/unit]
[move_unit]
id=fiend
to_x=35
to_y=20
[/move_unit]
[capture_village]
x,y=35,20
side=2
[/capture_village]
[delay]
time=300
[/delay]
[unit]
type=Merman Netcaster
id=Gwabbo
name= _ "Gwabbo"
unrenamable=yes
side=1
x=34
y=20
hitpoints=4
[modifications]
{TRAIT_LOYAL}
{TRAIT_FEARLESS}
[/modifications]
facing=se
animate=yes
{IS_LOYAL}
profile=portraits/gwabbo.png
[/unit]
[message]
speaker=Gwabbo
message= _ "Back, you fiend! You have not won...I will return to finish this."
[/message]
{MOVE_UNIT id=Gwabbo 20 10}
[delay]
time=500
[/delay]
[message]
speaker=Gwabbo
message= _ "Kai! We are under attack! Fell creatures invaded our village and slew without mercy. I managed to fight my way clear, and have come to seek your aid."
[/message]
[message]
speaker=Kai Krellis
message= _ "What manner of creatures were they?"
[/message]
[message]
speaker=Gwabbo
message= _ "I have never seen their like before in all my years. They were like men, but they had no skin. Our spears went right through them; they <i>laughed</i> at our weapons. And they smelled like nothing in the sea, of dank earth and rottenness."
[/message]
[message]
speaker=Cylanna
message= _ "Undead. This will be your first real test as a leader, Kai Krellis. You must defeat these creatures."
[/message]
[message]
speaker=Gwabbo
message= _ "Kai, please lead us against them yourself, it will hearten the folk. And — if you will permit — you reach the age now where a kai must learn battle skills."
[/message]
[message]
speaker=Cylanna
message= _ "Gwabbo speaks wisely. You must fight; I will protect you as much as I can...but when war looms, a kai must lead. It is our way."
[/message]
[message]
speaker=narrator
message= _ "You have few trained fighters, so you can only recruit three of each level 1 unit. There is no limit on citizens."
image=wesnoth-icon.png
duration=60
[/message]
[/event]
#define PUT_CORPSE_SWIMMER X Y
[unit]
#ifndef NIGHTMARE
type=Walking Corpse
#else
type=Soulless
#endif
side=2
variation=swimmer
x={X}
y={Y}
animate=yes
[/unit]
[delay]
time=200
[/delay]
#enddef
[event]
name=side 2 turn
first_time_only=yes
[message]
speaker=Mal-Kevek
message= _ "Rise, my slaves! We will create an army for Lord Ravanal."
[/message]
{PUT_CORPSE_SWIMMER 34 20}
{PUT_CORPSE_SWIMMER 34 21}
{PUT_CORPSE_SWIMMER 35 21}
[message]
speaker=Cylanna
message= _ "He is raising our dead to fight against us! Even though they were your own citizens, Krellis, show no mercy. Destroy them if you can."
[/message]
[/event]
#undef PUT_CORPSE_SWIMMER
[event]
name=last breath
[filter]
id=Mal-Kevek
[/filter]
[store_unit]
[filter]
id=Mal-Kevek
[/filter]
variable=MK
[/store_unit]
[message]
id=Mal-Kevek
message= _ "Foolish fish-men. You cannot kill <i>me</i> that easily."
[/message]
[message]
speaker=narrator
message= _ "The merfolk saw a shadowy shape rise from the dead body of the necromancer and disappear under the mountain."
image=wesnoth-icon.png
[/message]
[/event]
[event]
name=die
[filter]
id=Mal-Kevek
[/filter]
[move_unit_fake]
type=Dark Shape
x=$MK.x, 37, 37, 36, 35, 34, 33, 34
y=$MK.y, 25, 26, 26, 27, 26, 26, 24
side=2
[/move_unit_fake]
[sound]
name=wail-long.wav
[/sound]
{CLEAR_VARIABLE MK}
[/event]
# Zombies are spawned manually during the starting sequence, so we
# won't zombify villages until after turn 1 is over:
[event]
name=turn 2
# Because of the manual spawning we have to add this village
# manually to the list, to avoid the event below working on it again
[set_variable]
name=zombified_villages[$number_of_captured_villages].location
value=35_20
[/set_variable]
[set_variable]
name=number_of_captured_villages
add=1
[/set_variable]
# Pop up a couple zombies when the bad guys capture a village
# for the first time. (Recapturing doesn't do anything.)
[event]
name=capture
first_time_only=no
[filter]
side=2
[/filter]
# Check to see if the village has been taken over before.
# First, get the location:
[set_variable]
name=village_location
value=$x1|_$y1
[/set_variable]
# Loop through the zombified villages to see if that
# location has already been stored:
[foreach]
array=zombified_villages
[do]
[if]
[variable]
name=village_location
equals=$this_item.location
[/variable]
[then]
[set_variable]
name=already_zombified
value=yes
[/set_variable]
[/then]
[/if]
[/do]
[/foreach]
# If the village's location was not found in the
# array, it hasn't been taken over yet, so zombify
# it:
[if]
[variable]
name=already_zombified
not_equals=yes
[/variable]
[then]
# Note that it *is* taken over now by
# saving the location in the array:
[set_variable]
name=zombified_villages[$number_of_captured_villages].location
value=$x1|_$y1
[/set_variable]
# If it is a merman village, set
# zombie_variation to swimmer.
# Otherwise, make normal zombies:
[if]
[have_location]
terrain=Ww^Vm,Ss^Vm
x=$x1
y=$y1
[/have_location]
[then]
[set_variable]
name=zombie_variation
value=swimmer
[/set_variable]
[/then]
[else]
[set_variable]
name=zombie_variation
value=none
[/set_variable]
[/else]
[/if]
# Get the number of zombies from the list of numbers:
[repeat]
times=$zombie_number_pattern[ $($number_of_captured_villages % 5) ].number
[do]
#ifdef HARD
[if]
[variable]
name=zombie_type
equals=Soulless
[/variable]
[then]
[set_variable]
name=zombie_type
value=Walking Corpse
[/set_variable]
[/then]
[else]
[set_variable]
name=zombie_type
value=Soulless
[/set_variable]
[/else]
[/if]
#endif
[unit]
type=$zombie_type
side=$unit.side
variation=$zombie_variation
x=$x1
y=$y1
moves=0
attacks_left=0
animate=yes
[/unit]
[/do]
[/repeat]
# The second time this happens, warn the player that this will
# keep happening (in case it's not obvious yet):
[if]
[variable]
name=number_of_captured_villages
equals=2
[/variable]
[then]
[redraw][/redraw]
[message]
speaker=Kai Krellis
message= _ "He is raising the dead from every village!"
[/message]
[message]
speaker=Gwabbo
message= _ "This will be a dark day, but we <i>will</i> prevail."
[/message]
[/then]
[/if]
[set_variable]
name=number_of_captured_villages
add=1
[/set_variable]
{CLEAR_VARIABLE zombie_variation}
{CLEAR_VARIABLE already_zombified}
{CLEAR_VARIABLE village_location}
[/then]
[/if]
[/event]
[/event]
[event]
name=die
[filter_second]
id=Kai Krellis
[/filter_second]
[message]
speaker=Kai Krellis
message= _ "Hey, I did it!"
[/message]
[message]
speaker=Gwabbo
message= _ "Good work Kai, if I may say so."
[/message]
[/event]
[event]
name=enemies defeated
{CLEAR_VARIABLE side_1_limited_recruits}
{CLEAR_VARIABLE zombified_villages}
{CLEAR_VARIABLE number_of_captured_villages}
{CLEAR_VARIABLE zombie_type}
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/event]
{HERO_DEATHS}
[/scenario]