This file is indexed.

/usr/share/games/wesnoth/1.10/data/campaigns/The_South_Guard/scenarios/01_Born_to_the_Banner.cfg is in wesnoth-1.10-tsg 1:1.10.7-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
#textdomain wesnoth-tsg
[scenario]
    id=01_Born_to_the_Banner

    name= _ "Born to the Banner"
    next_scenario=02_Proven_by_the_Sword

    {SCENARIO_MUSIC breaking_the_chains.ogg}
    {EXTRA_SCENARIO_MUSIC knolls.ogg}

    map_data="{campaigns/The_South_Guard/maps/01_Born_to_the_Banner.map}"

    {campaigns/The_South_Guard/utils/sg_deaths.cfg}
    {campaigns/The_South_Guard/utils/sg_help.cfg}

    {DEFAULT_SCHEDULE}

    {TURNS 40 32 24}

    # Scenario Introduction - Summer

    {SG_BORN_TO_THE_BANNER}

    # The South Guard

    [side]  # wmllint: validate-off
        side=1
        {QUANTITY type (Horseman Commander) (Junior Commander) (Junior Commander)}
        id=Deoran
        name= _ "Deoran"
        unrenamable=yes
        facing=sw

        team_name=South_Guard
        user_team_name=_"South Guard"
        controller=human
        {CUSTOM_SG_FLAG}

        {GOLD 120 100 80}
        {INCOME 4 1 0}

        canrecruit=yes
        recruit=Peasant
    [/side] # wmllint: validate-on

    {STARTING_VILLAGES 1 4}

    # The Bandit Armies

    [side]
        side=2
        type=Bandit
        id=Urza Mathin
        name= _ "Urza Mathin"

        team_name=bandits
        user_team_name=_"Bandits"
        controller=ai

        {GOLD 40 70 90}

        canrecruit=yes
#ifdef EASY
        recruit=Ruffian,Thug
#endif

#ifdef NORMAL
        recruit=Ruffian,Thug,Poacher
#endif

#ifdef HARD
        recruit=Footpad,Thief,Poacher,Thug
#endif
        [ai]
            {ATTACK_DEPTH 1 2 3}
#ifdef EASY
            recruitment_pattern=fighter
#endif
#ifdef NORMAL
            recruitment_pattern=fighter,fighter,archer
#endif
#ifdef HARD
            recruitment_pattern=scout,fighter,archer,archer
#endif
        [/ai]
        {FLAG_VARIANT ragged}
    [/side]

    {STARTING_VILLAGES 2 14}

    [label]
        x,y=13,10
        text= _ "The River Fort"
    [/label]

    # Scenario Pre-start

    [event]
        name=prestart

        [objectives]
            side=1
            [objective]
                description= _ "Investigate the river fort"
                condition=win
            [/objective]
            [objective]
                description= _ "Defeat Urza Mathin"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Deoran"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

            [gold_carryover]
                bonus=yes
                carryover_percentage=40
            [/gold_carryover]
        [/objectives]

#ifdef EASY
        [set_variable]
            name=leader_attacked
            value=false
        [/set_variable]
#endif

        # Add a useful village on 'trivial' difficulty'.
#ifdef EASY
        {MODIFY_TERRAIN Gg^Vh 13 23}
#endif

        # Modify the size of the keep of the enemy on 'simple' and 'easy' difficulties.
#ifdef NORMAL
        {MODIFY_TERRAIN Ce 20 22}
#endif
#ifdef HARD
        {MODIFY_TERRAIN Ce 20 22}
        {MODIFY_TERRAIN Ce 19 24}
#endif
    [/event]

    # Scenario Start

    [event]
        name=start
        [message]
            speaker=narrator
            message= _ "Deoran found himself put to the test early in his command. Loris, the previous commander, had squandered his time in games and diversions and bandits had overrun the land..."
            image=wesnoth-icon.png
        [/message]

        [move_unit_fake]
            {QUANTITY type Pikeman Spearman Peasant}
            side=1
            x=18,18,18,19
            y=7,6,5,5
        [/move_unit_fake]

        [unit]
            {QUANTITY type Pikeman Spearman Peasant}
            id=Moreth
            name= _ "Moreth"
            side=1
            x,y=19,5
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_RESILIENT}
            [/modifications]
            {IS_LOYAL}
        [/unit]

        [message]
            speaker=Moreth
            message= _ "You’ll never take this village! I’ve seen your kind kill too many townsmen, and I’ll defend them to the death!"
        [/message]

        [message]
            speaker=Deoran
            image=portraits/deoran-mad.png
            message= _ "My kind? I am a soldier of Wesnoth, a messenger of King Haldric, and the new commander of the South Guard! What do you mean, <i>“my kind”</i>?"
        [/message]

        [message]
            speaker=Moreth
            message= _ "Sorry, sir! I thought you were one of the bandits who have been ransacking the towns and killing the villagers. What are you doing here? Sir Gerrick and I were the last of the South Guard..."
        [/message]

        [message]
            speaker=Deoran
            message= _ "I have been sent to take command of the South Guard and set things right. We must arm the villagers and drive off the bandits before they can do any more harm!"
        [/message]

        [message]
            speaker=Moreth
            message= _ "You should head to the river fort! Sir Gerrick will want to know that reinforcements have arrived!"
        [/message]

        {HIGHLIGHT_IMAGE 13 10 items/gohere.png ()}

#ifdef EASY
        [message]
            speaker=narrator
            image=items/gohere.png
            message= _ "Whenever you see a target that looks like this, you should move your leader (or whatever unit the dialog just suggested) onto the hex that contains it."
        [/message]
#endif

        [message]
            speaker=Urza Mathin
            message= _ "Ha! This new commander is a mere boy. He will soon share the fate of that swine Loris!"
        [/message]
    [/event]

    # The River Fort - You find Sir Gerrick defending the citadel.

    [event]
        name=moveto

        [filter]
            side=1
            x,y=13,10
        [/filter]

        [remove_item]
            x,y=13,10
        [/remove_item]

        [unit]
            side=1
            type=Infantry Lieutenant
            id=Sir Gerrick
            name= _ "Sir Gerrick"
            profile=portraits/sir-gerrick.png
            {IS_HERO}
            x,y=14,9
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_RESILIENT}
            [/modifications]
        [/unit]

        [message]
            speaker=Sir Gerrick
            message= _ "My lord, it is good that King Haldric has sent you to our lands! Bandits have overrun the whole countryside, and are killing and pillaging without pity. You must raise the South Guard again and drive off the bandits!"
        [/message]

        [message]
            speaker=Deoran
            message= _ "No doubt I am needed here. Unfortunately I have seen only farm tools to arm our men with. They are valorous, but cannot fight bandits with pitchforks!"
        [/message]

        [message]
            speaker=Sir Gerrick
            message= _ "I will open the citadel’s armory. We have a supply of spears and bows, and lacked only a leader to bring us to battle with them!"
        [/message]

#ifdef EASY
        [message]
            speaker=narrator
            image="units/infantry-commander.png~RC(magenta>red)"
            message= _ "Sir Gerrick is an infantry commander. He is a strong warrior in his own right, but when he is near less experienced troops, he makes their attack better too!"
        [/message]

        [message]
            speaker=narrator
            image="misc/hero-icon.png"
            message= _ "Units that have a <i>hero</i> marker are vital to your campaign. If any of them die, you will lose the scenario, so guard them carefully!"
        [/message]
#endif

        [objectives]
            side=1
            [objective]
                description= _ "Defeat Urza Mathin"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Deoran"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Sir Gerrick"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

            [gold_carryover]
                bonus=yes
                carryover_percentage=40
            [/gold_carryover]
        [/objectives]

#ifdef EASY
        [message]
            speaker=narrator
            image=items/gohere.png
            message= _ "Head back to the encampment where you started and recruit some troops!"
        [/message]

        {HIGHLIGHT_IMAGE 20 4 items/gohere.png ()}
#endif

        [allow_recruit]
            side=1
            type=Spearman, Bowman
        [/allow_recruit]
    [/event]

    # You return to the encampment and recruit troops.

#ifdef EASY
    [event]
        name=moveto
        [filter]
            x,y=20,4
        [/filter]

        [message]
            speaker=narrator
            message= _ "While you’re in your camp, you can recruit more troops. Build up a small force to use against the bandits that Urza Mathin recruits."
            image=wesnoth-icon.png
        [/message]
        [message]
            speaker=narrator
            image="units/human-loyalists/bowman.png~RC(magenta>red)"
            message= _ "Bowmen have a strong ranged attack, and are very effective against units that lack a ranged attack, like Thieves and Thugs. They also carry a sword and can defend themselves against melee attacks."
        [/message]
        [message]
            speaker=narrator
            image="units/human-loyalists/spearman.png~RC(magenta>red)"
            message= _ "Spearmen have a strong melee attack, and are effective against most units. They also have a weak ranged attack. They form the backbone of the South Guard."
        [/message]
        [message]
            speaker=narrator
            message= _ "The best army will have a mix of units to deal with the different enemies that you will encounter. For now, concentrate on creating a small corps of experienced Bowmen."
            image=wesnoth-icon.png
        [/message]

        [remove_item]
            x,y=20,4
        [/remove_item]
    [/event]
#endif

    # Dusk - Sir Gerrick suggests that you should hold the north banks of the river.

#ifdef EASY
    [event]
        name=turn 4

        [if]
            [have_unit]
                id=Sir Gerrick
            [/have_unit]
            [then]
                [message]
                    speaker=Sir Gerrick
                    message= _ "Sir, bandits are most dangerous at night. Let us hold the north bank of the river until dawn and press our attack in the morning!"
                [/message]

                [message]
                    speaker=narrator
                    image=misc/schedule-firstwatch.png
                    message= _ "All of your units are <i>lawful</i>. This means that they receive a combat bonus during the day, and a penalty at night. Urza Mathin’s units are all <i>chaotic</i>, which means that they receive a bonus at night and a penalty during the day. You will be much more effective fighting during the day."
                [/message]
            [/then]
        [/if]
    [/event]
#endif

    # Dawn - Sir Gerrick suggests that you should attack now!

#ifdef EASY
    [event]
        name=turn 7

        [if]
            [have_unit]
                id=Sir Gerrick
            [/have_unit]
            [then]
                [message]
                    speaker=Sir Gerrick
                    message= _ "My lord! The dawn is breaking — now is the time for us to attack and drive these bandits from our lands. To me men of the South Guard!"
                [/message]

                [message]
                    speaker=narrator
                    image=misc/schedule-dawn.png
                    message= _ "During the day your units will deal more damage, and Urza Mathin’s less. The more of his troops you can defeat during the day, the better!"
                [/message]
            [/then]
        [/if]
    [/event]
#endif

    # Mermen - You find mermen who will become allies and protect your waterways.

    [event]
        name=moveto
        [filter]
            side=1
            x,y=6,10
        [/filter]
        [unit]
            side=1
#ifdef EASY
            type=Merman Warrior
#endif
#ifdef NORMAL
            type=Merman Warrior
#endif
#ifdef HARD
            type=Merman Fighter
#endif
            id=Myssh
            name= _ "Myssh"
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_INTELLIGENT}
            [/modifications]
            x,y=7,11
            {IS_LOYAL}
        [/unit]
        [unit]
            side=1
#ifdef EASY
            type=Merman Spearman
#endif
#ifdef NORMAL
            type=Merman Hunter
#endif
#ifdef HARD
            type=Merman Hunter
#endif
            id=Ylla
            name= _ "Ylla"
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_QUICK}
            [/modifications]
            x,y=5,10
            {IS_LOYAL}
        [/unit]

        [message]
            speaker=Myssh
            message= _ "Your people have been allies of our lord, King Typhon. We will help you drive these bandits from your land if you allow us to live here in peace."
        [/message]

        [message]
            speaker=Deoran
            message= _ "We welcome your aid in the fight against these criminals! The rivers of this land are yours if you will aid us in our battles."
        [/message]

#ifdef EASY
        [message]
            speaker=narrator
            image="units/merfolk/hunter.png~RC(magenta>red)"
            message= _ "You may now recruit Merman Hunters. Mermen are aquatic creatures. Keep them in rivers and swamps and they will fight well! Put them on dry land and they’re in trouble!"
        [/message]
#endif

        [allow_recruit]
            side=1
            type=Merman Hunter
        [/allow_recruit]
        {VARIABLE has_mermen "yes"}
    [/event]

    # Village Ambush - You find something unexpected in one of the villages.

    [event]
        name=moveto
        [filter]
            side=1
            x,y=15,12
        [/filter]

#ifdef EASY
        [unit]
            side=1
            type=Longbowman
            id=Aleron
            name= _ "Aleron"
            x,y=16,12
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_QUICK}
            [/modifications]
            {IS_LOYAL}
        [/unit]

        [message]
            speaker=unit
            message= _ "Who goes there! Come out of the house now!"
        [/message]
        [message]
            speaker=Aleron
            message= _ "Stay! It’s me, Aleron! The villagers hid me from the bandits when the town was overrun. They have kept me safe, though I was gravely wounded..."
        [/message]
        [message]
            speaker=Sir Gerrick
            message= _ "I am glad to find you alive Aleron, we feared the worst when you did not return after the battle!"
        [/message]
        [message]
            speaker=Aleron
            message= _ "Let us punish these bandits for their crimes and murders! My wounds are healed and I am ready for battle!"
        [/message]
        [message]
            speaker=narrator
            message= _ "Aleron is a Longbowman, stronger and better trained than regular bowmen. His arrows are deadly to enemies without a ranged attack."
            image="units/human-loyalists/longbowman.png~RC(magenta>red)"
        [/message]
#endif

#ifdef NORMAL
        [unit]
            side=1
            type=Peasant
            id=Aleron
            name= _ "Aleron"
            x,y=16,12
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_STRONG}
            [/modifications]
            {IS_LOYAL}
        [/unit]

        [message]
            speaker=Aleron
            message= _ "Not more bandits... We have nothing left. Begone!"
        [/message]
        [message]
            speaker=unit
            message= _ "We are no bandits. The banner of the South Guard flies again! Help us drive these criminals from your land."
        [/message]
        [message]
            speaker=Aleron
            message= _ "However I can, I will help you!"
        [/message]
        [message]
            speaker=Sir Gerrick
            message= _ "Garrison the villages behind our lines and keep the enemy from slipping around us at night."
        [/message]
#endif

#ifdef HARD
        [unit]
            side=2
            type=Footpad
            random_traits=yes
            id=Glasar
            name= _ "Glasar"
            x,y=16,12
        [/unit]

        [message]
            speaker=Glasar
            message= _ "This village is ours to plunder! Begone or I will kill you all!"
        [/message]
        [message]
            speaker=unit
            message= _ "Do you not see the banners flying in the wind? The South Guard fights again. Flee while you can, or you will meet swift death on our spears!"
        [/message]
#endif
    [/event]

    # If the player doesn't find Sir Gerrick in five turns, prompt him again.

#ifdef EASY

    [event]
        name=turn 5
        [if]
            [have_unit]
                id=Sir Gerrick
            [/have_unit]
            [then]
            [/then]
            [else]
                {HIGHLIGHT_IMAGE 13 10 items/gohere.png ()}

                [message]
                    speaker=narrator
                    image=items/gohere.png
                    message= _ "Remember, Moreth told you that you should go meet Sir Gerrick at the river fort. Move Deoran there and find out what Sir Gerrick has to say!"
                [/message]
            [/else]
        [/if]
    [/event]

    # Nothing happens for a while: remind the player of the objective.

    [event]
        name=attack
        [filter_second]
            id=Urza Mathin
        [/filter_second]
        [set_variable]
            name=leader_attacked
            value=true
        [/set_variable]
    [/event]

    [event]
        name=turn 18
        [if]
            [variable]
                name=leader_attacked
                boolean_not_equals=true
            [/variable]
            [then]
                [scroll_to_unit]
                    id=Urza Mathin
                [/scroll_to_unit]
                [message]
                    speaker=narrator
                    image="units/human-outlaws/bandit.png~RC(magenta>red)"
                    message= _ "Remember, your job is to defeat Urza Mathin. He should be your main target. Archers will be especially effective against him, because he has no ranged attack. Surround him, and kill him!"
                [/message]
            [/then]
        [/if]
    [/event]

#endif

    # Victory - The bandits are defeated.

    [event]
        name=last breath
        [filter]
            id=Urza Mathin
        [/filter]

        [message]
            speaker=Urza Mathin
            message= _ "My days of pillage and plunder are over! My brothers will avenge me..."
        [/message]

        [kill]
            x,y=$x1,$y1
            animate=yes
        [/kill]

        [message]
            speaker=Sir Gerrick
            message= _ "He is dead! Congratulations, commander. We thought we would never see reinforcements — Did Sir Loris send you from Westin?"
        [/message]

        [message]
            speaker=Deoran
            message= _ "No. I have been sent by King Haldric to take command of the South Guard. The King has heard no news in weeks. How long have you and your men been shut up in the citadel?"
        [/message]

        [message]
            speaker=Sir Gerrick
            message= _ "Almost two months. Sir Loris took one of our patrols along the Westin road and never returned; and the next night, bandits struck and killed eight of my men. We held the citadel, and held out vain hope for reinforcement from Westin. We never thought we would see men sent from the King!"
        [/message]

        [message]
            speaker=Deoran
            image=portraits/deoran-sad.png
            message= _ "This is worse than even my darkest fears. We must ride to Westin at once, and hope that Sir Loris is there and well! Come men! Ride for Westin!"
        [/message]

        {CLEAR_VARIABLE leader_attacked}

        [endlevel]
            result=victory
            bonus=yes
            {NEW_GOLD_CARRYOVER 40}
        [/endlevel]
    [/event]
[/scenario]