-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
02_Proven_by_the_Sword.cfg
722 lines (616 loc) · 21.5 KB
/
02_Proven_by_the_Sword.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
#textdomain wesnoth-tsg
[scenario]
id=02_Proven_by_the_Sword
name= _ "Proven by the Sword"
next_scenario=03_A_Desperate_Errand
{SCENARIO_MUSIC battle.ogg}
{EXTRA_SCENARIO_MUSIC the_city_falls.ogg}
map_data="{campaigns/The_South_Guard/maps/02_Proven_by_the_Sword.map}"
{campaigns/The_South_Guard/utils/sg_deaths.cfg}
{campaigns/The_South_Guard/utils/sg_help.cfg}
[label]
x,y=22,16
text=_"Westin"
[/label]
{DEFAULT_SCHEDULE_SECOND_WATCH}
victory_when_enemies_defeated=no
turns=9
# Scenario Introduction - Not all is right in Westin.
{SG_PROVEN_BY_THE_SWORD}
{TSG_BIGMAP {JOURNEY_02_NEW} }
# The South Guard
[side]
side=1
type=Horseman Commander
id=Deoran
name= _ "Deoran"
profile=portraits/deoran.png
unrenamable=yes
team_name=South_Guard
user_team_name=_"South Guard"
controller=human
{CUSTOM_SG_FLAG}
{GOLD 130 100 85}
canrecruit=yes
recruit=Bowman, Spearman
[/side]
{STARTING_VILLAGES 1 4}
# The Bandit Armies
# wmllint: local spelling Nalmath
[side]
side=2
type=Outlaw
id=Urza Nalmath
name= _ "Urza Nalmath"
team_name=bandits
user_team_name=_"Bandits"
controller=ai
{GOLD 20 30 40}
canrecruit=yes
{QUANTITY recruit (Ruffian,Thief,Footpad)
(Ruffian,Thug,Thief,Poacher)
(Footpad,Thug,Thief,Poacher,Trapper)}
[ai]
grouping=no
{NO_SCOUTS}
{QUANTITY recruitment_pattern (fighter,fighter,scout,fighter)
(fighter,archer,fighter,fighter)
(scout,fighter,archer,fighter,fighter)}
# The units at the beginning should not focus villages:
village_value=0
# scout_village_targeting=0
{MODIFY_AI_DELETE_CANDIDATE_ACTION 2 main_loop villages}
[/ai]
{FLAG_VARIANT6 ragged}
# These units won't, unlike all recruited ones, burn down villages.
# Instead they capture them, if they move onto one.
#define VILLAGE_USERS
[+unit]
role=Criminal
upkeep=loyal
[/unit]
#enddef
{NAMED_GENERIC_UNIT 2 Footpad 28 13 () (_"Criminal")} {VILLAGE_USERS}
{NAMED_GENERIC_UNIT 2 Footpad 21 17 () (_"Criminal")} {VILLAGE_USERS} {GUARDIAN}
#ifdef NORMAL
{NAMED_GENERIC_UNIT 2 Footpad 34 14 () (_"Criminal")} {VILLAGE_USERS}
{NAMED_GENERIC_UNIT 2 Poacher 18 22 () (_"Criminal")} {VILLAGE_USERS} {GUARDIAN}
#endif
#ifdef HARD
{NAMED_GENERIC_UNIT 2 Footpad 34 14 () (_"Criminal")} {VILLAGE_USERS}
{NAMED_GENERIC_UNIT 2 Thief 18 22 () (_"Criminal")} {VILLAGE_USERS} {GUARDIAN} # Thief instead of Poacher
{NAMED_GENERIC_UNIT 2 Thief 22 12 () (_"Criminal")} {VILLAGE_USERS} {GUARDIAN}
#endif
[/side]
{STARTING_VILLAGES 2 21}
[event]
name=turn 6
# Now is the time that the recruited units may have met Deoran's,
# and may have the chance to recapture a village.
[modify_side]
side=2
[ai]
village_value=3
[/ai]
[/modify_side]
{MODIFY_AI_ADD_CANDIDATE_ACTION 2 main_loop {AI_CA_VILLAGES}}
[/event]
[event]
name=prestart
# Add a useful village on 'trivial' difficulty.
#ifdef EASY
{MODIFY_TERRAIN Gg^Vh 26 20}
[capture_village]
side=2
x,y=26,20
[/capture_village]
#endif
# Modify the size of the keep of the enemy on 'simple' and 'easy' difficulties.
#ifdef NORMAL
{MODIFY_TERRAIN Ce 18 27}
#endif
#ifdef HARD
{MODIFY_TERRAIN Ce 18 27}
{MODIFY_TERRAIN Ce 19 28}
#endif
# Make Urza Nalmath water-phobic
[object]
silent=yes
[filter]
side=2
canrecruit=yes
[/filter]
[effect]
apply_to=movement_costs
replace=yes
[movement_costs]
shallow_water={UNREACHABLE}
swamp_water={UNREACHABLE}
[/movement_costs]
[/effect]
[/object]
[store_unit]
[filter]
side=2
canrecruit=no
gender=female
[/filter]
variable=namechange
[/store_unit]
[foreach]
array=namechange
[do]
{VARIABLE this_item.name _"female^Criminal"}
[unstore_unit]
variable=this_item
find_vacant=no
[/unstore_unit]
[/do]
[/foreach]
{CLEAR_VARIABLE namechange}
[/event]
[event]
name=start
[recall]
id=Sir Gerrick
[/recall]
#ifdef EASY
[recall]
type=Royal Guard, Pikeman, Swordsman, Javelineer, Master Bowman, Longbowman
[/recall]
[recall]
type=Royal Guard, Pikeman, Swordsman, Javelineer, Master Bowman, Longbowman
[/recall]
#endif
#ifdef NORMAL
[recall]
type=Royal Guard, Pikeman, Swordsman, Javelineer, Master Bowman, Longbowman
[/recall]
#endif
[message]
speaker=Deoran
message= _ "Look there! Smoke rises from Westin! The bandits must have already overrun the garrison and are sacking the city!"
[/message]
[message]
speaker=Sir Gerrick
message= _ "Then we must make haste before they leave the city in ruins and slaughter all who live therein."
[/message]
{HIGHLIGHT_IMAGE 22 16 items/gohere.png ()}
[message]
speaker=Urza Nalmath
message= _ "What?! Those soldiers come from the northern forts... this can only mean my brother Mathin is dead. Those fiends! They will pay for his death!"
[/message]
[objectives]
side=1
[objective]
[show_if]
[variable]
name=citadel_secured
boolean_not_equals=yes
[/variable]
[/show_if]
description= _ "Occupy the Citadel of Westin"
condition=win
[/objective]
[objective]
[show_if]
[variable]
name=citadel_secured
boolean_equals=yes
[/variable]
[not]
[have_unit]
id=Minister Hylas
[/have_unit]
[/not]
[/show_if]
description= _ "Bring Deoran to the Citadel of Westin"
condition=win
[/objective]
[objective]
[show_if]
[have_unit]
id=Minister Hylas
[/have_unit]
[/show_if]
description= _ "Defeat Urza Nalmath, the bandit leader"
condition=win
[/objective]
[objective]
description= _ "Death of Deoran"
condition=lose
[/objective]
[objective]
description= _ "Death of Sir Gerrick"
condition=lose
[/objective]
[objective]
[show_if]
[have_unit]
id=Minister Hylas
[/have_unit]
[/show_if]
description= _ "Death of Minister Hylas"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
[/event]
# Someone from the South Guard reaches the citadel and holds it.
[event]
name=moveto
[filter]
side=1
x,y=22,16
[/filter]
{VARIABLE citadel_secured "yes"}
[modify_turns]
{QUANTITY add 31 23 19}
[/modify_turns]
# Check if it is Deoran. If not, tell him to go to Westin.
[if]
[have_unit]
x,y=22,16
[not]
id=Deoran
[/not]
[/have_unit]
[then]
[message]
speaker=unit
message= _ "At last, the citadel is secure."
[/message]
[message]
speaker=Sir Gerrick
message= _ "Excellent, but there is still no sign of Sir Loris. Sir Deoran, you should take command of the keep."
[/message]
[show_objectives][/show_objectives]
[/then]
[/if]
[/event]
# Deoran arrives at the citadel.
[event]
name=moveto
[filter]
id=Deoran
x,y=22,16
[/filter]
[remove_item]
x,y=22,16
[/remove_item]
[unit]
type=White Mage
id=Minister Hylas
profile=portraits/hylas.png
name= _ "Minister Hylas"
unrenamable=yes
{IS_HERO}
side=1
x,y=21,16
[modifications]
{TRAIT_LOYAL}
{TRAIT_INTELLIGENT}
[/modifications]
[/unit]
[message]
speaker=Deoran
image=portraits/deoran-mad.png
message= _ "More bandits?! Prepare to die!"
[/message]
[message]
speaker=Minister Hylas
message= _ "Peace, I am a friend! I am Hylas, advisor to Sir Loris and Chief Minister of the town council. Thanks to your timely arrival, the city is saved!"
[/message]
[message]
speaker=Deoran
message= _ "Indeed, we have defeated most of the bandits in the city. But where is Sir Loris? And where is the city garrison?"
[/message]
[message]
speaker=Minister Hylas
message= _ "Alas, Sir Loris fell in battle several days ago. For weeks, we warned him of the new power of these bandits, yet he would never lead his men against them until their strength had become too great for us to handle. I sent a messenger to the king about our plight, but some misfortune must have befallen him, for you are the first reinforcements to arrive here. If only Sir Loris had sent a rider earlier, he might have survived long enough to stand with us here."
[/message]
[if]
[have_unit]
id=Urza Nalmath
[/have_unit]
[then]
[message]
speaker=Deoran
image=portraits/deoran-sad.png
message= _ "Indeed. Foolish though he may have been, it still grieves me to learn of his death. With him gone, it seems that I must lead the townsfolk against the bandits and drive them from our city."
[/message]
{NAMED_LOYAL_UNIT 1 Peasant 18 15 (Ufes) (_"Ufes")}
{NAMED_LOYAL_UNIT 1 Peasant 18 16 (Joran) (_"Joran")}
{NAMED_LOYAL_UNIT 1 Peasant 19 18 (Makees) (_"Makees")}
{NAMED_LOYAL_UNIT 1 Peasant 20 18 (Tyborg) (_"Tyborg")}
[message]
speaker=Ufes
message= _ "We stand with you, Sir Deoran! We will hold the city while you lead your men across the river and defeat the bandit leader!"
[/message]
[show_objectives][/show_objectives]
[set_recruit]
side=2
{QUANTITY recruit (Walking Corpse)
(Walking Corpse,Skeleton,Vampire Bat)
(Skeleton,Skeleton Archer,Vampire Bat,Blood Bat)}
[/set_recruit]
# Update the [ai] params so that the recruitment_pattern matches
# the new recruits.
[modify_side]
side=2
[ai]
{QUANTITY recruitment_pattern (fighter)
(fighter,fighter,scout,fighter)
(fighter,archer,fighter,archer,scout)}
[/ai]
[/modify_side]
[gold]
side=2
{QUANTITY amount 15 30 60}
[/gold]
[/then]
[else]
[message]
speaker=Deoran
image=portraits/deoran-sad.png
message= _ "Indeed. Foolish though he may have been, it still grieves me to learn of his death. At least we have managed to defeat some of the bandits now. What else happened?"
[/message]
# Peasants have already been spawned.
[fire_event]
name=victory dance
[/fire_event]
[/else]
[/if]
[/event]
# Deoran is too late.
[event]
name=turn 8
[if]
[variable]
name=citadel_secured
boolean_not_equals="yes"
[/variable]
[then]
[message]
speaker=Sir Gerrick
message= _ "They are almost to the great hall! Hurry, Deoran! We must reach the citadel before it is stormed by the bandits!"
[/message]
#ifdef EASY
{HIGHLIGHT_IMAGE 22 16 items/gohere.png ()}
[message]
speaker=narrator
message= _ "You must move someone here by the end of the next turn, or Westin will fall and you will be defeated!"
image=wesnoth-icon.png
[/message]
#endif
[/then]
[/if]
[/event]
[event]
name=side 1 turn 9 end
[if]
[variable]
name=citadel_secured
boolean_not_equals="yes"
[/variable]
[then]
[message]
speaker=Sir Gerrick
message= _ "We’re too late! They have burned the whole city..."
[/message]
[message]
speaker=Deoran
image=portraits/deoran-sad.png
message= _ "Alas, Westin has fallen! There is nothing else I can do here — I can only return to the King and report our loss here..."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/then]
[/if]
[/event]
# The undead attack!
[event]
name=prerecruit
[filter]
side=2
race=undead
[/filter]
[message]
speaker=Urza Nalmath
message= _ "Now, the South Guard will feel the wrath of my new allies! Rise again, my undead warriors!"
[/message]
[event]
name=side turn
[scroll_to_unit]
race=undead
[/scroll_to_unit]
[message]
speaker=Sir Gerrick
message= _ "What devilry is this?! Those are no living men that fight for him!"
scroll=no
[/message]
[message]
speaker=Minister Hylas
message= _ "This development is troubling to me as well. He must have made some pact with the undead, but how could a mere brigand gain such powers?"
scroll=no
[/message]
[message]
speaker=Deoran
message= _ "It matters not. No matter how he has done this fell thing, we must defeat him!"
scroll=no
[/message]
#ifdef EASY
[message]
speaker=narrator
image="units/human-magi/white-mage-magic-1.png~RC(magenta>red)"
message= _ "Minister Hylas can heal allied units near him and his <i>arcane</i> attack deals bonus damage to undead foes."
scroll=no
[/message]
#endif
[/event]
[/event]
# Pillaging and burning the villages near Westin.
[event]
name=capture
[filter]
side=2
race=human
[not]
role=Criminal
[/not]
[/filter]
[message]
speaker=Urza Nalmath
message= _ "Leave nothing standing! Raze their villages and kill them all!"
[/message]
[message]
speaker=unit
message= _ "We will avenge your brother’s death!"
[/message]
[message]
speaker=Sir Gerrick
message= _ "They are burning our homes! We must stop them!"
[/message]
[/event]
[event]
name=capture
first_time_only=no
[filter]
side=2
race=human
[not]
role=Criminal
[/not]
[/filter]
[sound]
name=torch.ogg
[/sound]
{VARIABLE_OP random_string value "scenery/village-human-burned1.png,scenery/village-human-burned2.png,scenery/village-human-burned3.png,scenery/village-human-burned4.png"}
{RANDOM $random_string}
{PLACE_IMAGE $random $x1 $y1}
{CLEAR_VARIABLE random,random_string}
{MODIFY_TERRAIN Gg $x1 $y1}
[gold]
side=2
amount=10
[/gold]
[/event]
# Victory
[event]
name=last breath
[filter]
id=Urza Nalmath
[/filter]
[message]
speaker=unit
message= _ "My brother has died unavenged! I have failed!"
[/message]
[kill]
x,y=$x1,$y1
animate=yes
[/kill]
[if]
[have_unit]
id=Minister Hylas
x,y=$x2,$y2
[/have_unit]
[then]
[message]
speaker=Deoran
message= _ "How can a bandit have summoned undead?"
[/message]
[/then]
[else]
[message]
speaker=second_unit
message= _ "How can a bandit have summoned undead?"
[/message]
[/else]
[/if]
[if]
[have_unit]
id=Minister Hylas
[/have_unit]
[then]
[fire_event]
name=victory dance
[/fire_event]
[/then]
[else]
{NAMED_LOYAL_UNIT 1 Peasant 18 15 (Ufes) (_"Ufes")}
{NAMED_LOYAL_UNIT 1 Peasant 18 16 (Joran) (_"Joran")}
{NAMED_LOYAL_UNIT 1 Peasant 19 18 (Makees) (_"Makees")}
{NAMED_LOYAL_UNIT 1 Peasant 20 18 (Tyborg) (_"Tyborg")}
[message]
speaker=Ufes
message= _ "The bandits are defeated!"
[/message]
[if]
[have_unit]
side=2
count=0-2
[/have_unit]
[then]
[message]
speaker=Makees
message= _ "Westin is safe again."
[/message]
[/then]
[else]
[message]
speaker=Makees
message= _ "Westin will soon be safe again."
[/message]
[/else]
[/if]
[show_objectives][/show_objectives]
[/else]
[/if]
[/event]
[event]
name=victory dance
[message]
speaker=Minister Hylas
message= _ "Just before the bandit raids began, an ambassador came to Sir Loris from the elves of the Aethenwood. He asked that a knight be sent to discuss a new threat to Wesnoth."
[/message]
[message]
speaker=Deoran
message= _ "And did Sir Loris go to the elves?"
[/message]
[message]
speaker=Minister Hylas
message= _ "No. He suspected the elves of some trickery and made no reply to them. Perhaps they know the origin of these dead warriors we now face."
[/message]
[message]
speaker=Deoran
message= _ "My men have been trained to fight the living. I do not know that we can protect the city from foes as unnatural as these by ourselves. It is probably best that I meet the elves in hope that their counsel will be of some aid."
[/message]
[message]
speaker=Minister Hylas
message= _ "I will accompany you, Sir Deoran. I have studied sacred arts and my skills may be of some use against the dark ones."
[/message]
[message]
speaker=Deoran
message= _ "Very well. Although it will probably take too long to send word to the King for reinforcements, I remember there being a small outpost within a couple day's ride of here. I will send a message to them asking for a few riders, then we should make haste toward the Aethenwood to find the elves."
[/message]
{CLEAR_VARIABLE citadel_secured}
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/event]
[event]
name=victory
[disallow_recruit]
type=Peasant
side=1
[/disallow_recruit]
[/event]
[/scenario]
#undef VILLAGE_USERS