This file is indexed.

/usr/share/games/wesnoth/1.10/data/campaigns/Liberty/scenarios/08_Glory.cfg is in wesnoth-1.10-l 1:1.10.2-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
 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
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
#textdomain wesnoth-l
[scenario]
    id=08_Glory
    name= _ "Glory"
    next_scenario=09_Epilogue
    victory_when_enemies_defeated=no
    map_data="{campaigns/Liberty/maps/08_Glory.map}"
    {TURNS 48 45 40}
    {AFTERNOON}
    {DUSK}
    {FIRST_WATCH}
    {SECOND_WATCH}
    {DAWN}
    {MORNING}

    {INTRO_AND_SCENARIO_MUSIC heroes_rite.ogg loyalists.ogg}
    {EXTRA_SCENARIO_MUSIC vengeful.ogg}
    {EXTRA_SCENARIO_MUSIC the_city_falls.ogg}
    {EXTRA_SCENARIO_MUSIC battle.ogg}
    {EXTRA_SCENARIO_MUSIC breaking_the_chains.ogg}

    # wmllint: local spelling Archmagi
    [story]
        [part]
            story= _ "In the Year of Wesnoth 161, the newly crowned king sought to tame the wildlands that separated the human cities surrounding Weldyn and the coastal regions of Elensefar once and for all."
        [/part]
        [part]
            story= _ "The grand army of Wesnoth, personally led by the High Council of Archmagi, scoured the plains of all manner of hostile creature, be it beast, orc, or elf. The city-state of Elensefar was formally united to the kingdom and settlements rapidly spread. The country of Wesnoth had been carved in deed as well as in name."
        [/part]
        [part]
            background=story/Halstead.jpg
            story= _ "A monument to this achievement was erected in the very heart of the wildlands. In a twelve-year ritual, the High Council demonstrated the height to which human magic had grown over the years by drawing the monument directly from the earth’s living rock."
        [/part]
        [part]
            background=story/Halstead.jpg
            story= _ "Hundreds of feet tall, the mountain towered high above the plains, its sheer walls both inspiring and terrifying. Men from all over the countryside labored there, building the most formidable fortress ever conceived. It became the Stronghold of Halstead."
        [/part]
        [part]
            background=story/Halstead.jpg
            story= _ "This sentinel of the western plains stood watch as Wesnoth prospered for many centuries under the protection it provided. No war has overcome it, and its walls have never been overrun. The blood of invaders stains its parapets and the bones of the defeated crumble at the base of Halstead’s frozen waves of stone."
        [/part]

        [part]
            music="battle.ogg"
            show_title=yes
            {TO_GLORY}
        [/part]
    [/story]

    [side]
        side=1
        type=Highwayman
        id=Baldras
        canrecruit=yes
        controller=human
        gold=200
        team_name=good_guys
        user_team_name=_"Rebels"
    [/side]

    {AI_CONTROLLER () 1 5,6 ()}

    {STARTING_VILLAGES 1 4}

    [side]
        side=2
        type=General
        id=Dommel
        name= _ "Dommel"
        profile=portraits/dommel.png
        canrecruit=yes
        recruit=Swordsman,Pikeman,Dragoon,Shock Trooper,Longbowman,Red Mage,White Mage,Spearman,Heavy Infantryman,Bowman
        {GOLD 200 340 400}
        {INCOME 10 20 40}
        controller=ai
        color=blue
        [ai]
            {AI_SIMPLE_ALWAYS_ASPECT village_value 0}
            {AI_SIMPLE_ALWAYS_ASPECT leader_value 0}
            {AI_SIMPLE_DAY_ASPECT aggression 0.4}
            {AI_SIMPLE_NIGHT_ASPECT aggression 0}
            {AI_SIMPLE_ALWAYS_ASPECT caution 0.9}
            [goal]
                # This is supposed to make the AI tend to group at the gates
                [criteria]
                    side=2,3
                    # These cover the area around the four gates
                    x=14-16,19-21,19-21,25-27
                    y=14-19,10-13,19-22,14-19
                    # Only try to group with 1-2 other units, instead of forming
                    # huge lumps of units
                    [filter_adjacent]
                        side=2,3
                        count=1-2
                    [/filter_adjacent]
                [/criteria]
                value=5
            [/goal]
            {AI_SIMPLE_ALWAYS_ASPECT_VALUE avoid (
                [not]
                    # These cover Halstead itself and a bit of the area around
                    # the four gates
                    x=14-26,12-28,17-23
                    y=11-22,14-20,10-22
                [/not]
            )}
        [/ai]
        team_name=bad_guys
        user_team_name=_"Asheviere"
        {FLAG_VARIANT loyalist}
    [/side]

    {STARTING_VILLAGES 2 20}

    [side]
        side=3
        no_leader=yes
        controller=ai
        color=blue
        [ai]
            {AI_SIMPLE_ALWAYS_ASPECT village_value 0}
            {AI_SIMPLE_ALWAYS_ASPECT leader_value 0}
            {AI_SIMPLE_ALWAYS_ASPECT aggression 0.4}
            [goal]
                value=10
                [criteria]
                    [filter_location]
                        # These cover Halstead itself and a bit of the area around
                        # the four gates
                        x=14-26,12-28,17-23
                        y=11-22,14-20,10-22
                    [/filter_location]
                [/criteria]
            [/goal]
        [/ai]
        team_name=bad_guys
        user_team_name=_"Asheviere"
        {FLAG_VARIANT loyalist}
    [/side]

    [side]
        side=4
        type=Orcish Warlord
        id=Vashna
        name= _ "Vashna"
        canrecruit=yes
        facing=sw
        recruit=Wolf Rider,Orcish Grunt,Orcish Archer,Orcish Assassin,Troll,Troll Whelp
        gold=300
        controller=ai
        color=green
        [ai]
            turns=1-6
            caution=0.2
            aggression=0.8
            scout_village_targeting=1

            [target]
                side=1,5
                value=1.0
            [/target]
            [target]
                side=2,3
                value=2.5
            [/target]
            [target]
                side=6
                value=0.5
            [/target]

            [avoid]
                x,y=1-22,1-40
            [/avoid]
        [/ai]
        [ai]
            turns=7-FOREVER
            caution=0.1
            aggression=0.9
            scout_village_targeting=1

            [target]
                side=1,5
                value=1.0
            [/target]
            [target]
                side=2,3
                value=2.5
            [/target]
            [target]
                side=6
                value=0.5
            [/target]

            [avoid]
                x,y=1-17,1-40
            [/avoid]
        [/ai]
        team_name=orcs_dammit
        user_team_name=_"Orcs"
        {FLAG_VARIANT ragged}
    [/side]

    {STARTING_VILLAGES 4 5}

    [side]
        side=5
        type=Shadow Lord
        id=Helicrom
        name= _ "Helicrom"
        profile=portraits/helicrom.png
        canrecruit=yes
        facing=sw
        recruit=Shadow Mage,Fugitive,Rogue Mage,Rogue,Huntsman
        {GOLD 700 600 500}
        controller=ai
        color=purple
        [ai]
            recruitment_pattern=mixed fighter,mixed fighter,fighter,mixed fighter,archer
            [target]
                id=Dommel
                value=10
            [/target]
        [/ai]
        team_name=good_guys
        user_team_name=_"Rebels"
    [/side]

    [side]
        side=6
        no_leader=yes
        {GOLD 380 260 160}
        controller=ai
        color=black
        team_name=good_guys
        user_team_name=_"Rebels"
        [ai]
            turns=1-6
            aggression=0.6
            caution=0.6
            leader_value=0.5

            [target]
                side=2
                value=2.5
            [/target]

            [target]
                side=3
                value=1.5
            [/target]

            [target]
                side=4
                value=0.5
            [/target]

            [target]
                id=Dommel
                value=0.25
            [/target]

            [avoid]
                x,y=18-40,1-40
            [/avoid]
        [/ai]

        [ai]
            turns=7-FOREVER
            aggression=0.6
            caution=0.6
            leader_value=0.5

            [target]
                side=2
                value=2.5
            [/target]

            [target]
                side=3
                value=1.5
            [/target]

            [target]
                side=4
                value=0.5
            [/target]

            [target]
                id=Dommel
                value=0.25
            [/target]

            [avoid]
                x,y=22-40,1-40
            [/avoid]
        [/ai]
    [/side]

    [event]
        name=prestart

        [objectives]
            side=1
            [objective]
                description= _ "Destroy the stronghold of Halstead"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Baldras"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}
        [/objectives]

        #Initialize the counter and switches
        {VARIABLE supports_destroyed 0}
        {VARIABLE harper_dead 0}
        {VARIABLE dommel_dead 0}

        #Set up the inside of the fortress just like we want it
        {PLACE_IMAGE scenery/trapdoor-closed.png 16 13}
        {PLACE_IMAGE scenery/trapdoor-closed.png 24 13}
        {PLACE_IMAGE scenery/trapdoor-closed.png 16 19}
        {PLACE_IMAGE scenery/trapdoor-closed.png 24 19}

        #Some badass trapdoor guards
#define MK_GUARD SIDE TYPE X Y
    # Create a guard unit TYPE belonging to SIDE at X,Y
    # Will have a guardian AI, no traits, and a generated description.
    [unit]
        type={TYPE}
        side={SIDE}
        x={X}
        y={Y}
        ai_special=guardian
        generate_name=yes
    [/unit]
#enddef
        {MK_GUARD 2 (Royal Guard)  16 13}
        {MK_GUARD 2 (Royal Guard)  24 13}
        {MK_GUARD 2 (Royal Guard)  16 19}
        {MK_GUARD 2 (Royal Guard)  24 19}
#ifdef NORMAL
        {MK_GUARD 2 (Longbowman)   16 14}
        {MK_GUARD 2 (Pikeman)      17 13}
        {MK_GUARD 2 (Longbowman)   23 13}
        {MK_GUARD 2 (Pikeman)      24 14}
        {MK_GUARD 2 (Pikeman)      16 18}
        {MK_GUARD 2 (Longbowman)   17 20}
        {MK_GUARD 2 (Pikeman)      23 20}
        {MK_GUARD 2 (Longbowman)   24 18}
#endif
#ifdef HARD
        {MK_GUARD 2 (Longbowman)   15 13}
        {MK_GUARD 2 (Pikeman)      16 14}
        {MK_GUARD 2 (Pikeman)      17 13}
        {MK_GUARD 2 (Longbowman)   25 13}
        {MK_GUARD 2 (Pikeman)      23 13}
        {MK_GUARD 2 (Pikeman)      24 14}
        {MK_GUARD 2 (Longbowman)   15 20}
        {MK_GUARD 2 (Pikeman)      16 18}
        {MK_GUARD 2 (Pikeman)      17 20}
        {MK_GUARD 2 (Longbowman)   25 20}
        {MK_GUARD 2 (Pikeman)      23 20}
        {MK_GUARD 2 (Pikeman)      24 18}
        {MK_GUARD 2 (Halberdier)   18 16}
#endif
#undef MK_GUARD

        {MODIFY_TERRAIN Gg (5) (3)}

        #If the shadow gang is supposed to come help, then leave things
        # otherwise kill the shadow lord and erase his castle
        [if]
            [variable]
                name=Helicrom_status
                numerical_equals=3
            [/variable]
            [then]
                # Add the AI controller note if Helicrom is helping out
                [objectives]
                    side=1
                    [objective]
                        description= _ "Destroy the stronghold of Halstead"
                        condition=win
                    [/objective]
                    [objective]
                        description= _ "Death of Baldras"
                        condition=lose
                    [/objective]

                    {TURNS_RUN_OUT}

                    {AI_CONTROLLER_NOTE}
                [/objectives]
            [/then]
            [else]
                [kill]
                    side=5
                [/kill]
                {MODIFY_TERRAIN Gs^Fds (25-28) (37-40)}
            [/else]
        [/if]
    [/event]

    #
    # Starting conversation and actions
    #
    [event]
        name=start

        #First, take away Harper's shield. He can die now. Sorry, Harper!
        [recall]
            id=Harper
        [/recall]

        {UNMAKE_HERO Harper}

        [message]
            speaker=Baldras
            message= _ "There it is. The stronghold of Halstead."
        [/message]

        [scroll_to]
            x,y=20,16
        [/scroll_to]

        [delay]
            time=1000
        [/delay]

        [message]
            speaker=Harper
            message= _ "Look at how tall it is! Those towers rise sheer out of the ground, as if called forth out of the earth."
        [/message]
        [message]
            speaker=Baldras
            message= _ "That may not be too far from the truth. During the time of the Great Kings of Wesnoth, this land was tamed with powerful magic. Wizards of an ancient era forged the walls of Halstead from the rock below."
        [/message]
        [message]
            speaker=Harper
            message= _ "I don’t see how we can bring it down. They are already invincible in there!"
        [/message]

        [if]
            [variable]
                name=Helicrom_status
                numerical_equals=3
            [/variable]
            [then]
                [message]
                    speaker=Helicrom
                    message= _ "No, my young friend. Halstead indeed has a weakness. Among my many assets is access to a wealth of secrets few in Wesnoth are privy to."
                [/message]
                [message]
                    speaker=Helicrom
                    message= _ "You see, the mountain on which the fort was built is solid, but the castle on top has been built and rebuilt many times over the ages. It is not as indestructible as you might think."
                [/message]
                [message]
                    speaker=Helicrom
                    message= _ "Beneath the structure is a system of catacombs that connects all four towers to the central keep. Over time, after many wars, supports were required to hold up the middle."
                [/message]
                [message]
                    speaker=Harper
                    message= _ "So... we can knock out the supports and bring down the stronghold of Halstead. Would it really work?"
                [/message]
                [message]
                    speaker=Helicrom
                    message= _ "I believe it will. Each tower has a passage down to the catacombs. If we can reach the center of each tower, one of our men can escape down to the bowels of the mountain and destroy its support. I am sure we will need to demolish no less than all four supports to raze the fortress."
                [/message]
            [/then]
            [else]
                [message]
                    speaker=Baldras
                    message= _ "No, young one. Halstead indeed has a weakness."
                [/message]
                [message]
                    speaker=Harper
                    message= _ "How do you know?"
                [/message]
                [message]
                    speaker=Baldras
                    message= _ "When I was a boy, my father — your grandfather — brought your dad and me to live in Aldril after orcs massacred many in our village. We grew up around here, and we learned many things."
                [/message]
                [message]
                    speaker=Baldras
                    message= _ "Beneath the structure is a system of catacombs that connects all four towers to the central keep. The catacombs growing over time, combined with centuries of war, made it necessary to install supports to hold up the middle."
                [/message]
                [message]
                    speaker=Harper
                    message= _ "So... we can knock out the supports and bring down the stronghold of Halstead. Would it really work?"
                [/message]
                [message]
                    speaker=Baldras
                    message= _ "I believe it will. Each tower has a passage down to the catacombs. If we can reach the center of each tower, one of our men can escape down to the bowels of the mountain and destroy its support. I am sure we will need to demolish no less than all four supports to raze the fortress."
                [/message]
            [/else]
        [/if]
        [message]
            speaker=Harper
            message= _ "I hope you’re right. In a few hours, night will fall, and we will find out."
        [/message]
        [message]
            speaker=Baldras
            message= _ "We must be cautious. Look there, a substantial orc force is also advancing on Halstead. They must think Wesnoth’s army is spread out right now."
        [/message]
        [message]
            speaker=Harper
            message= _ "Heh. They’re in for a surprise. This may work to our advantage."
        [/message]
    [/event]

    #
    # Special Event - The cavalry comes (to help YOU)
    #
    [event]
        name=turn 4
        [role]
            role=farseer
            type=Outlaw,Footpad,Bandit,Thug,Thief,Huntsman,Trapper,Poacher,Rogue Mage,Rogue,Shadow Mage
        [/role]
        [message]
            role=farseer
            message= _ "Look in the distance... riders approach!"
        [/message]
        [if]
            [have_unit]
                role=farseer
            [/have_unit]
            [then]
                [message]
                    speaker=Baldras
                    message= _ "Who is it?"
                [/message]
                [message]
                    role=farseer
                    message= _ "Help, I hope. Circumstances cannot afford to get much more dire."
                [/message]
            [/then]
            [else]
                [message]
                    speaker=Baldras
                    message= _ "Riders approach from the northwest! Stand fast, men."
                [/message]
            [/else]
        [/if]

        [unit]
            side=6
            type=Paladin
            id=Sir Gwydion
            name= _ "Sir Gwydion"
            x,y=1,1
            canrecruit=yes
        [/unit]

        {MOVE_UNIT (id=Sir Gwydion) 5 3}

        {GENERIC_UNIT 6 (Lancer) 4 3}
        {GENERIC_UNIT 6 (Lancer) 6 2}
        {GENERIC_UNIT 6 (Knight) 4 2}
        {GENERIC_UNIT 6 (Knight) 5 2}
        #
        #
        [message]
            type=Lancer
            message= _ "Sound the advance!"
        [/message]
        [message]
            speaker=Sir Gwydion
            message= _ "Knights of Elensefar, behold: the battle has already begun! Make camp here. Then, we charge!"
        [/message]

        {MODIFY_TERRAIN Ce (4-6,4) (2-2,3)}
        {MODIFY_TERRAIN Ke (5) (3)}

        [set_recruit]
            side=6
            recruit=Knight,Lancer
        [/set_recruit]

        [message]
            speaker=Baldras
            message= _ "Amazing. Lord Maddock sent his house guards... his finest troops! Elensefar must be defenseless now. More hinges on this battle than I thought."
        [/message]
        [message]
            role=farseer
            # wmllint: local spelling Gwydion
            message= _ "Baldras, Gwydion is Lord Maddock’s son. This battle isn’t just about Annuvin anymore."
        [/message]

        # Add the AI controller note when Gwydion shows up
        [objectives]
            side=1
            [objective]
                description= _ "Destroy the stronghold of Halstead"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Baldras"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

            {AI_CONTROLLER_NOTE}
        [/objectives]
    [/event]

    #
    # Special Event - The cavalry comes (to help THEM) -
    # every other afternoon a platoon arrives
    #
#define BAD_CAVALRY TURN
    [event]
        name=turn {TURN}
        [message]
            speaker=narrator
            message= _ "That afternoon, another advance element of the main Wesnoth army arrived..."
            image="wesnoth-icon.png"
        [/message]

        # The side filter in MOVE_UNIT is used to ensure that only the spawned
        # unit can be moved, in case the player would have misplaced his units
        # on the spawn coordinates.

        {GENERIC_UNIT 3 (Shock Trooper) 40 23}
        {MOVE_UNIT x,y,side=40,23,3 38 23}

        {GENERIC_UNIT 3 (Shock Trooper) 40 24}
        {MOVE_UNIT x,y,side=40,24,3 39 23}

        {GENERIC_UNIT 3 (Shock Trooper) 40 23}
        {MOVE_UNIT x,y,side=40,23,3 38 22}

        {GENERIC_UNIT 3 (Pikeman) 40 24}
        {MOVE_UNIT x,y,side=40,24,3 39 21}

        {GENERIC_UNIT 3 (Lieutenant) 40 23}
        {MOVE_UNIT x,y,side=40,23,3 37 21}

        {GENERIC_UNIT 3 (Longbowman) 40 24}
        {MOVE_UNIT x,y,side=40,24,3 38 21}

        {GENERIC_UNIT 3 (Heavy Infantryman) 40 23}
        {MOVE_UNIT x,y,side=40,23,3 39 24}
    [/event]
#enddef

    {BAD_CAVALRY 7}
    {BAD_CAVALRY 13}
    {BAD_CAVALRY 19}
    {BAD_CAVALRY 25}
    {BAD_CAVALRY 31}

    # If the side 3 reinforcements move to a village, it is given to side 2
    [event]
        name=moveto
        first_time_only=no

        [filter]
            side=3

            [filter_location]
                terrain=*^V*
            [/filter_location]
        [/filter]

        [capture_village]
            side=2
            x,y=$x1,$y1
        [/capture_village]
    [/event]

    #
    # Special Event - the first time you kill one of them, they catch on
    # that you're trying to storm the fortress (color dialogue)
    #
    [event]
        name=attack
        [filter]
            side=2
        [/filter]
        [filter_second]
            side=1,5,6
        [/filter_second]
        [message]
            speaker=Dommel
            message= _ "I think... I think they’re trying to storm Halstead itself... the fools!"
        [/message]
    [/event]

    #
    # Special Event - when you enter the fortress proper they freak out
    # (color dialogue)
    #
    [event]
        name=moveto
        [filter]
            x,y=20,16
            radius=4
            side=1,4,5
        [/filter]
        [message]
            speaker=Dommel
            message= _ "They have breached the fortress gate! Repulse them!"
        [/message]
    [/event]

    #
    # Special Event - You move a unit to a tower center
    #
#define MOVETO_TRAPDOOR X Y
    [event]
        name=moveto
        [filter]
            x,y={X},{Y}
            side=1,5
        [/filter]
        [message]
            speaker=unit
            message= _ "I’m inside the tower! I’m going down to the catacombs — cover me."
        [/message]
        [hide_unit]
            x,y={X},{Y}
        [/hide_unit]
        [sound]
            name=fuse.ogg
        [/sound]
        [message]
            speaker=narrator
            message= _ "After about an hour..."
            image="wesnoth-icon.png"
        [/message]
        [sound]
            name=explosion.ogg
        [/sound]
        [unhide_unit]
        [/unhide_unit]
        [message]
            speaker=unit
            message= _ "It’s done."
        [/message]
        [set_variable]
            name=supports_destroyed
            add=1
        [/set_variable]
        [remove_item]
            x,y={X},{Y}
        [/remove_item]
        [if]
            [variable]
                name=supports_destroyed
                numerical_equals=4
            [/variable]
            [then]
                [sound]
                    name=fire.wav
                [/sound]
                {QUAKE "rumble.ogg"}
                {QUAKE "rumble.ogg"}
                {QUAKE "rumble.ogg"}
                [sound]
                    name=fire.wav
                [/sound]
                {QUAKE "rumble.ogg"}
                [message]
                    speaker=narrator
                    message= _ "The stronghold of Halstead began to shake..."
                    image="wesnoth-icon.png"
                [/message]
                [message]
                    speaker=unit
                    message= _ "We cannot stay here. The fortress has started to collapse!"
                [/message]
                {VARIABLE supports_destroyed all}
            [/then]
        [/if]
    [/event]
#enddef

    {MOVETO_TRAPDOOR 16 13}
    {MOVETO_TRAPDOOR 24 13}
    {MOVETO_TRAPDOOR 16 19}
    {MOVETO_TRAPDOOR 24 19}

    #
    # Special event - you knock out all four supports
    #
    [event]
        name=new turn
        first_time_only=no
        [if]
            [variable]
                name=supports_destroyed
                equals=all
            [/variable]
            [then]
                [scroll_to]
                    x,y=20,16
                [/scroll_to]
                {QUAKE "rumble.ogg"}
                [message]
                    speaker=Baldras
                    message= _ "I think it’s working! Everybody get clear <i>now</i>!"
                [/message]

                # When you finish your turn, the fortress will collapse

                [event]
                    name=side turn
                    first_time_only=no

                    [if]
                        [variable]
                            name=side_number
                            equals=2
                        [/variable]
                        [then]
                            [scroll_to]
                                x,y=20,16
                            [/scroll_to]
                            [sound]
                                name=fire.wav
                            [/sound]
                            {QUAKE "cave-in.ogg"}
                            [message]
                                speaker=narrator
                                message= _ "With a thunderous roar and a vast billowing of dust, thousands of tons of stone and wood crashed in on itself. Some of it tumbled down the steep sides, while the remainder came to rest several hundred feet below ground, in the bowels of the hollowed-out mountain."
                                image="wesnoth-icon.png"
                            [/message]
                            [message]
                                speaker=narrator
                                message= _ "No one inside the fortress would make it out alive."
                                image="wesnoth-icon.png"
                            [/message]

                            {QUAKE "cave-in.ogg"}
                            {QUAKE "cave-in.ogg"}

                            [kill]
                                fire_event=yes
                                animate=no
                                x=15-25
                                y=12-20
                            [/kill]
                            [redraw][/redraw]

                            [scroll_to]
                                x,y=20,16
                            [/scroll_to]

                            #
                            # Wrecking the castle
                            #
                            [terrain_mask]
                                x,y=15,11
                                mask="usage=mask
border_size=0

Re          , Mm^Xm       , Re          , Ww          , Rr          , Ww^Bw|      , Rr          , Rr          , Gs^Fds      , Mm^Xm       , Gs^Fds
Mm          , Chr         , Mm^Xm       , Re          , Uh          , Uu          , Uh          , Uh          , Mm^Xm       , Uu          , Mm^Xm
Uu          , Uu          , Qxu         , Uu          , Re          , Qxu         , Re          , Qxu         , Chr         , Rr          , Chr
Uu          , Chr         , Qxu         , Qxu         , Qxu         , Qxu         , Qxu         , Qxu         , Uu          , Qxu         , Re
Uh          , Qxu         , Qxu         , Re          , Uh          , Uh          , Chr         , Chr         , Qxu         , Qxu         , Qxu
Re          , Qxu         , Qxu         , Chr         , Mm          , Mm^Xm       , Mm          , Qxu         , Qxu         , Qxu         , Uh
Ce          , Qxu         , Qxu         , Re          , Mm          , Uh          , Mm          , Qxu         , Qxu         , Qxu         , Uh
Uh          , Qxu         , Qxu         , Qxu         , Qxu         , Qxu         , Chr         , Qxu         , Qxu         , Uu          , Qxu
Chr         , Rr          , Qxu         , Qxu         , Qxu         , Qxu         , Qxu         , Qxu         , Qxu         , Uu          , Uu
Uu          , Uu          , Chr         , Uh          , Re          , Uu          , Uu          , Uh          , Uu          , Chr         , Chr
"
                            [/terrain_mask]

                            [redraw][/redraw]

                            [sound]
                                name=rumble.ogg
                            [/sound]

                            [delay]
                                time=2000
                            [/delay]

                            [endlevel]
                                result=victory
                                carryover_report=no
                                save=no
                            [/endlevel]
                        [/then]
                    [/if]
                [/event]
            [/then]
        [/if]
    [/event]

    #
    # Loss conditions - turns run out
    #
    [event]
        name=time over
        [message]
            speaker=narrator
            message= _ "After more than a week of fierce fighting, the main body of Asheviere’s host arrived from Weldyn. The battle was soon finished. Every last man from the province of Annuvin was executed."
            image="wesnoth-icon.png"
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    #
    # Deaths - Baldras (loss condition)
    #
    # wmllint: local spelling Unngh
    [event]
        name=last breath
        [filter]
            id=Baldras
        [/filter]

        [if]
            [variable]
                name=supports_destroyed
                equals=all
            [/variable]
            [variable]
                name=side_number
                numerical_equals=2
            [/variable]
            [then]
                [message]
                    speaker=Baldras
                    message= _ "Men, help me out of here! I am trapped under this rubble."
                [/message]
                [message]
                    speaker=narrator
                    message= _ "No one was able to get to Baldras in time. He and many of his companions died that day beneath the stronghold of Halstead."
                    image="wesnoth-icon.png"
                [/message]
                [message]
                    speaker=Baldras
                    message= _ "I hope this sacrifice is not in vain... but we will never know."
                [/message]
            [/then]
            [else]
                [message]
                    speaker=Baldras
                    message= _ "Our dream of freedom... gone... Unngh."
                [/message]
            [/else]
        [/if]
        [message]
            speaker=narrator
            image=wesnoth-icon.png
            message=_ "The rebellion had staked its all on victory at Halstead, but win or lose, there would be no help for the villagers, ground beneath the wheels of Asheviere’s wrath."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
    #
    # Deaths - Harper
    #
    [event]
        name=last breath
        [filter]
            id=Harper
        [/filter]
        [message]
            speaker=Harper
            message= _ "Uncle!"
        [/message]
        [message]
            speaker=Baldras
            message= _ "NO!"
        [/message]
        [message]
            speaker=Baldras
            message= _ "I promised your father I would watch after you... and I failed."
        [/message]
        [message]
            speaker=Baldras
            message= _ "But we are so close to the end. We must finish this. I am sorry you will not be able to enjoy our freedom. Goodbye, Harper."
        [/message]
        {VARIABLE harper_dead 1}
    [/event]
    #
    # Deaths - Helicrom
    #
    [event]
        name=last breath
        [filter]
            id=Helicrom
        [/filter]
        [message]
            speaker=Helicrom
            message= _ "Carry on, my friends. Fighting by your side is the most honorable thing I have done..."
        [/message]
    [/event]

    #
    # Deaths - Dommel
    #

    # If either the orcs or Helicrom's guys happen to kill Dommel, we pretend
    # that Baldras killed him so that the dialogue makes more sense
    [event]
        name=last breath

        [filter]
            id=Dommel
        [/filter]

        [filter_second]
            side=4,5
        [/filter_second]

        [fire_event]
            name=last breath

            [primary_unit]
                id=Dommel
            [/primary_unit]

            [secondary_unit]
                id=Baldras
            [/secondary_unit]
        [/fire_event]
    [/event]

    [event]
        name=last breath

        [filter]
            id=Dommel
        [/filter]

        [filter_second]
            side=1,6
        [/filter_second]

        [message]
            speaker=second_unit
            message= _ "Your reign of terror is over, General."
        [/message]

        [message]
            speaker=Dommel
            message= _ "You will never successfully oppose Asheviere. Her power is too great... This small victory today is but a reprieve from the unimaginable pain you will suffer when the full force of her wrath descends upon you."
        [/message]

        [if]
            [variable]
                name=supports_destroyed
                equals=all
            [/variable]
            [then]
                [message]
                    speaker=Baldras
                    message= _ "This was no small victory. You underestimate the power of love for freedom."
                [/message]
                [message]
                    speaker=Dommel
                    # wmllint: local spelling Uungh
                    message= _ "You... underestimate the... cruelty and ambition of your Queen... Uungh..."
                [/message]
                {VARIABLE dommel_dead 2}
            [/then]
            [else]
                [message]
                    speaker=Baldras
                    message= _ "Small victory? Bah! Now we will raze this fortress and bury it in the earth from whence it came."
                [/message]
                {VARIABLE dommel_dead 1}
            [/else]
        [/if]
    [/event]
[/scenario]