This file is indexed.

/usr/share/games/wesnoth/1.10/data/campaigns/Eastern_Invasion/scenarios/11_Captured.cfg is in wesnoth-1.10-ei 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
#textdomain wesnoth-ei
[scenario]
    id=11_Captured
    name= _ "Captured"
    next_scenario=12_Evacuation
    map_data="{campaigns/Eastern_Invasion/maps/11_Captured.map}"
    victory_when_enemies_defeated=no
    {TURNS 50 40 30}
    {UNDERGROUND}

    {INTRO_AND_SCENARIO_MUSIC northerners.ogg the_deep_path.ogg}
    {EXTRA_SCENARIO_MUSIC breaking_the_chains.ogg}
    {EXTRA_SCENARIO_MUSIC underground.ogg}

    {campaigns/Eastern_Invasion/utils/deaths.cfg}

    # wmllint: local spelling Dra-Nak
    [story]
        [part]
            story= _ "After reaching what they believed was safety, Gweddry and his men had been captured by northern orcs."
            #       background=story/
        [/part]
        [part]
            story= _ "Informed they were being taken to the orcish king, Dra-Nak, they attempted to escape before that happened..."
            show_title=yes
            #       background=story/
        [/part]
    [/story]

    #######
    #sides#
    #######
    [side]
        type=General
        id=Gweddry
        name= _ "Gweddry"
        side=1
        canrecruit=no
        controller=human
        team_name=good
        user_team_name=_"Wesnothians"
        fog=yes
        shroud=yes
        gold=100
        {FLAG_VARIANT loyalist}
    [/side]

    [side]
        type=Orcish Warlord
        id=King Dra-Nak
        name= _ "King Dra-Nak"
        side=2
        canrecruit=yes
        controller=ai
        recruit=
        {GOLD 40 50 60}
        [ai]
            passive_leader=yes
            grouping=no
            recruitment_ignore_bad_combat=yes
            aggression=0.4
            [avoid]
                x=1-7,7-14,14-21
                y=1-24,21-24,16-24
            [/avoid]
        [/ai]
        team_name=bad
        user_team_name=_"Evil"
        {FLAG_VARIANT ragged}
    [/side]

    [side]
        side=3
        no_leader=yes
        [ai]
            aggression=1.0  # An insanely aggressive guardian :-)
        [/ai]
        team_name=bad
        user_team_name=_"Evil"
    [/side]

    #####################
    #lots of definitions#
    #####################

#define GUARD X Y TYPE
    [unit]
        type={TYPE}
        side=2
        x={X}
        y={Y}
        ai_special=guardian
    [/unit]
#enddef

#define ATTACKER X Y TYPE
    [unit]
        type={TYPE}
        side=2
        x={X}
        y={Y}
    [/unit]
#enddef

#define SIDE3 X Y TYPE
    [unit]
        type={TYPE}
        side=3
        x={X}
        y={Y}
        ai_special=guardian
    [/unit]
#enddef

#define ROLE TYPE ROLE_VALUE X Y
    [role]
        type={TYPE}
        side=1
        role={ROLE_VALUE}
    [/role]
    [recall]
        role={ROLE_VALUE}
        x,y={X},{Y}
    [/recall]
#enddef

    ######################
    #/lots of definitions#
    ######################

    [event]
        name=prestart

        # {SCATTER_IMAGE (terrain=Uu) 4 scenery/rubble.png}

        [objectives]
            side=1
            [objective]
                description= _ "Escape through the south-west tunnel"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Gweddry"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Dacyn"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Owaec"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

            [gold_carryover]
                bonus=yes
                carryover_percentage=40
            [/gold_carryover]
        [/objectives]
        ##############################
        #starting units (like guards)#
        ##############################
        #the first guards
        #you cannot go out this way!
        {GUARD 34 17 (Troll Warrior)}
        {GUARD 34 19 (Troll Warrior)}
        {GUARD 31 18 (Troll Warrior)}
        {GUARD 31 20 (Troll Warrior)}
        {GUARD 27 17 (Troll Warrior)}
        {GUARD 27 19 (Troll Warrior)}

        #kings chamber guards
        {GUARD 9 16 (Orcish Warrior)}
        {GUARD 12 14 (Orcish Warrior)}
        {GUARD 15 16 (Orcish Warrior)}
        {GUARD 15 19 (Orcish Warrior)}
        {GUARD 25 11 (Orcish Warrior)}
        {GUARD 12 20 (Orcish Warrior)}
        {GUARD 9 19 (Orcish Warrior)}

        #torture chamber guards
        {GUARD 33 28 (Orcish Slayer)}
        {GUARD 30 26 (Orcish Slayer)}
        {GUARD 27 27 (Orcish Assassin)}
        {GUARD 28 29 (Orcish Assassin)}

        #these are bats that inhabit the side tunnels
        {SIDE3 14 9 (Blood Bat)}
        {SIDE3 19 10 (Vampire Bat)}
        {SIDE3 22 9 (Vampire Bat)}
        {SIDE3 24 7 (Vampire Bat)}
        {SIDE3 33 10 (Vampire Bat)}
    [/event]

    #########################
    #names for all the rooms#
    #########################
    [label]
        x,y=23,25
        text=_"Prison"
    [/label]
    [label]
        x,y=33,28
        text=_"Torture Chamber"
    [/label]
    [label]
        x,y=12,18
        text=_"Throne Room"
    [/label]
    [label]
        x,y=28,32
        text=_"The City"
    [/label]
    [label]
        x,y=19,33
        text=_"The City"
    [/label]
    [label]
        x,y=15,32
        text=_"Exit"
    [/label]

    #############################
    #THE START EVENT BEGINS HERE#
    #############################
    [event]
        name=start
        ################
        #getting people#
        ################
        #getting Dacyn and Owaec
        [recall]
            id=Dacyn
            x,y=28,11
        [/recall]
        [recall]
            id=Owaec
            x,y=28,10
        [/recall]
        #getting the sidekicks
        {ROLE (Red Mage,Longbowman,Master Bowman,Arch Mage,Silver Mage,Great Mage) SIDE1 27 10}
        {ROLE (Swordsman,Pikeman,Javelineer,Royal Guard,Halberdier) SIDE2 29 10}

        ##################
        #huge intro scene#
        ##################

        #some talking
        [message]
            speaker=Gweddry
            message= _ "I think Dacyn and Owaec have escaped already. Now I have to, also... these guards are not being very alert, I may be able to get past them..."
        [/message]
        {MOVE_UNIT id=Gweddry 30 18}

        [redraw]
            side=1
        [/redraw]

        [message]
            speaker=Gweddry
            message= _ "Aha! There is a small crack in the cave wall here."
        [/message]

        {MOVE_UNIT id=Gweddry 29 16}

        [redraw]
            side=1
        [/redraw]

        {MOVE_UNIT id=Gweddry 29 12}

        [redraw]
            side=1
        [/redraw]

        #dialogue
        [message]
            speaker=Dacyn
            message= _ "So, Gweddry, you escaped too? Good. I think they have the rest of our troops captive, along with the peasants following us. We should be able to rescue them."
        [/message]
        [message]
            speaker=Gweddry
            message= _ "Where are they? These caves are impossible to navigate!"
        [/message]
        [message]
            speaker=Dacyn
            message= _ "Somewhere south of us. We are in a hidden passage in the north. Oh, and some others escaped too, along with Owaec."
        [/message]

        {CLEAR_FOG 1 13 17 6}

        [message]
            speaker=King Dra-Nak
            message= _ "Well, where are the prisoners?"
        [/message]
        [message]
            x,y=15,16
            message= _ "Right here, boss."
        [/message]
        [message]
            speaker=King Dra-Nak
            message= _ "Well, where’s their leader? I don’t see him."
        [/message]
        [message]
            x,y=15,16
            message= _ "Uh... " + {WHISPER _"whisper^I dunno. He escaped, I think."}
        [/message]
        [message]
            speaker=King Dra-Nak
            message= _ "You fool! Well, find him. Bring him to me! Wait, no, just kill him on sight."
        [/message]

        {UNCLEAR_FOG}

        [place_shroud]
            side=1
            x=5-25
            y=5-25
        [/place_shroud]

        #######################
        #event inside an event#
        #######################
        [event]
            name=sighted,moveto
            [filter]
                type=Orcish Grunt,Orcish Warrior
                [filter_vision]
                    viewing_side=1
                [/filter_vision]
            [/filter]
            [message]
                speaker=unit
                message= _ "Look, the escaped prisoners have returned!"
            [/message]
            [message]
                speaker=King Dra-Nak
                message= _ "Kill them."
            [/message]
            #these are prisoners even though the macro is called PRISON

            #first group of prisoners- in the small cell

            # lvl4 units are stored first, then lvl3, then lvl2 and lastly lvl1:
            # this makes it easy to just keep recalling the first unit of the
            # array in order to ensure the prisoners are always the highest lvl
            # units possible

            [store_unit]
                [filter]
                    side=1
                    x,y=recall,recall
                    level=4
                [/filter]

                kill=no
                variable=possible_prisoners
            [/store_unit]

            [store_unit]
                [filter]
                    side=1
                    x,y=recall,recall
                    level=3
                [/filter]

                kill=no
                variable=possible_prisoners
                mode=append
            [/store_unit]

            [store_unit]
                [filter]
                    side=1
                    x,y=recall,recall
                    level=2
                [/filter]

                kill=no
                variable=possible_prisoners
                mode=append
            [/store_unit]

            [store_unit]
                [filter]
                    side=1
                    x,y=recall,recall
                    level=1
                [/filter]

                kill=no
                variable=possible_prisoners
                mode=append
            [/store_unit]

            [set_variables]
                name=prisoner_locations

                [value]
                    x,y=37,27
                [/value]
                [value]
                    x,y=38,27
                [/value]
                [value]
                    x,y=39,28
                [/value]
                [value]
                    x,y=39,29
                [/value]
                [value]
                    x,y=39,30
                [/value]
                [value]
                    x,y=38,30
                [/value]
                [value]
                    x,y=37,31
                [/value]
                [value]
                    x,y=36,31
                [/value]
                [value]
                    x,y=35,31
                [/value]
                [value]
                    x,y=34,30
                [/value]
                [value]
                    x,y=38,29
                [/value]
                [value]
                    x,y=37,30
                [/value]
                [value]
                    x,y=36,30
                [/value]
            [/set_variables]

            # for each prisoner location, we either recall the first unit of the
            # array (and then remove it from the array) or create a new unit if
            # the array is empty (meaning that the recall list had less than 13
            # units

            {FOREACH prisoner_locations i}
                [if]
                    [variable]
                        name=possible_prisoners.length
                        greater_than=0
                    [/variable]

                    [then]
                        {VARIABLE_OP possible_prisoners[0].hitpoints multiply 0.75}

                        [kill]
                            side=1
                            x,y=recall,recall
                            id=$possible_prisoners[0].id
                        [/kill]

                        [unstore_unit]
                            variable=possible_prisoners[0]
                            x,y=$prisoner_locations[$i].x,$prisoner_locations[$i].y
                            find_vacant=yes
                        [/unstore_unit]

                        {CLEAR_VARIABLE possible_prisoners[0]}
                    [/then]

                    [else]
                        [if]
                            [variable]
                                name=have_ogres
                                boolean_equals=yes
                            [/variable]

                            [then]
                                {RANDOM "Young Ogre,Spearman,Cavalryman,Mage,Horseman,Heavy Infantryman"}
                            [/then]

                            [else]
                                {RANDOM "Spearman,Cavalryman,Mage,Horseman,Heavy Infantryman"}
                            [/else]
                        [/if]

                        [unit]
                            side=1
                            type=$random
                            generate_name=yes
                            random_traits=yes
                            x,y=$prisoner_locations[$i].x,$prisoner_locations[$i].y
                            to_variable=new_prisoner
                        [/unit]

                        {VARIABLE_OP new_prisoner.hitpoints multiply 0.75}

                        [unstore_unit]
                            variable=new_prisoner
                        [/unstore_unit]
                    [/else]
                [/if]
            {NEXT i}

            [redraw]
                side=1
            [/redraw]

            #a prisoner says something
            [message]
                x,y=37,27
                message= _ "The guards are distracted! Now is the time to escape!"
            [/message]
            [message]
                x,y=33,28
                message= _ "Huh? Who’s there, who said that?"
            [/message]
            {ATTACKER 24 24 (Orcish Warrior)}
            {ATTACKER 24 25 (Orcish Warrior)}
            {ATTACKER 24 25 (Troll Warrior)}
            {ATTACKER 28 31 (Orcish Warrior)}
            {ATTACKER 29 32 (Orcish Warrior)}
            {ATTACKER 28 32 (Troll Warrior)}
        [/event]
        ########################
        #/event inside an event#
        ########################
    [/event]
    ###########################
    #THE START EVENT ENDS HERE#
    ###########################

    {PICKUPPABLE_ITEM holy_amulet 22 38 side=1 items/ankh-necklace.png
    _"Wearing this amulet will cause every blow you deal to inflict <i>arcane</i> damage!"
    _"holy amulet^Take it"
    _"holy amulet^Leave it"
    _"I am not suited to using this item! Let another take it." (
        [object]
            name= _ "Holy Amulet"
            image=items/ankh-necklace.png
            duration=forever

            [effect]
                apply_to=attack
                range=melee
                set_type=arcane
            [/effect]
            [effect]
                apply_to=attack
                range=ranged
                set_type=arcane
            [/effect]
        [/object]
    )}

    #they start recruiting to chase you at turn 20
    [event]
        name=turn 20
        [allow_recruit]
            side=2
            type=Orcish Warrior,Orcish Crossbowman,Troll
        [/allow_recruit]
    [/event]

    #if you try to leave the way you came, it yells at you
    [event]
        name=moveto
        [filter]
            id=Gweddry
            x=23-31
            y=15-21
        [/filter]
        [message]
            speaker=Gweddry
            message= _ "I see the exit to the tunnel! Onward!"
        [/message]
        [message]
            speaker=Dacyn
            message= _ "Wait! We cannot go out that way. There are too many orcs. We must exit through the south-west gates."
        [/message]
        [message]
            speaker=Gweddry
            message= _ "Very well. We must go the other way."
        [/message]
    [/event]

    #victory
    #when you exit the caves, you win
    [event]
        name=moveto
        [filter]
            x=1-11
            y=32-40
            id=Gweddry
        [/filter]
        [message]
            speaker=Gweddry
            message= _ "Good! We have escaped these accursed caves!"
        [/message]
        [endlevel]
            result=victory
            bonus=yes
            {NEW_GOLD_CARRYOVER 40}
        [/endlevel]
    [/event]

    {FOREIGN_DEFEAT}
[/scenario]