-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
11_Captured.cfg
1267 lines (1029 loc) · 30.1 KB
/
11_Captured.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
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
#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=-1
{UNDERGROUND}
{INTRO_AND_SCENARIO_MUSIC northerners.ogg the_deep_path.ogg}
{EXTRA_SCENARIO_MUSIC breaking_the_chains.ogg}
{EXTRA_SCENARIO_MUSIC underground.ogg}
# 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."
[/part]
[part]
story= _ "Gweddry, Dacyn and Owaec were promptly taken before the orcish king, Dra-Nak, while the rest were thrown into the orcish prisons to await their turn..."
[/part]
[/story]
[side]
type=General
id=Gweddry
name= _ "Gweddry"
side=1
canrecruit=no
controller=human
team_name=good
user_team_name=_"Wesnothians"
shroud=yes
gold=0
{FLAG_VARIANT loyalist}
[/side]
[side]
type=Orcish Warlord
id=King Dra-Nak
name= _ "King Dra-Nak"
profile=portraits/orcs/grunt-5.png
facing=sw
side=2
canrecruit=yes
controller=ai
recruit=
gold=0
[ai]
passive_leader=yes
grouping=no
aggression=0.4
[aspect]
id=attacks
[facet]
invalidate_on_gamestate_change=yes
[filter_enemy]
[not]
[filter_wml]
[variables]
undercover=yes
[/variables]
[/filter_wml]
[/not]
[/filter_enemy]
[/facet]
[/aspect]
[/ai]
team_name=bad
user_team_name=_"Orcs"
{FLAG_VARIANT6 ragged}
[/side]
[side]
side=3
no_leader=yes
controller=ai
team_name=good,bad
user_team_name=_"Prisoners"
share_vision=no
share_maps=no
[ai]
ai_algorithm=idle_ai
[/ai]
[/side]
[event]
name=prestart
{PLACE_IMAGE items/burial.png 22 13}
{PLACE_IMAGE items/burial.png 26 11}
{PLACE_IMAGE scenery/gate-rusty-se.png 26 5}
{PLACE_IMAGE scenery/gate-rusty-se.png 21 8}
{PLACE_IMAGE scenery/gate-rusty-se.png 17 10}
{PLACE_IMAGE scenery/gate-rusty-sw.png 29 9}
{PLACE_IMAGE scenery/trash.png 22 2}
{PLACE_IMAGE items/bones.png 10 2}
{PLACE_IMAGE items/bones.png 10 4}
{PLACE_IMAGE items/barrel.png 14 15}
{PLACE_IMAGE items/box.png 15 15}
{PLACE_IMAGE items/armor.png 16 15}
{PLACE_IMAGE scenery/trash.png 16 16}
{PLACE_IMAGE scenery/trash.png 30 24}
[recall]
id=Dacyn
x,y=28,13
[/recall]
[recall]
id=Owaec
x,y=26,14
[/recall]
[role]
side=1
type=Royal Guard,Halberdier,Great Mage,Master Bowman,Arch Mage,Silver Mage,Mage of Light,Javelineer,Swordsman,Pikeman,Longbowman,Red Mage,White Mage,Mage,Spearman,Cavalryman,Horseman,Iron Mauler,Shock Trooper,Heavy Infantryman
role=escapee leader
[not]
id=Dacyn
[/not]
[/role]
[role]
side=1
type=White Mage,Red Mage,Longbowman,Pikeman,Swordsman,Javelineer,Mage,Spearman,Cavalryman,Horseman,Mage of Light,Arch Mage,Silver Mage,Master Bowman,Halberdier,Royal Guard,Great Mage,Iron Mauler,Shock Trooper,Heavy Infantryman
role=escapee sidekick 1
[not]
id=Dacyn
[/not]
[not]
[and]
role=escapee leader
[/and]
[/not]
[/role]
[role]
side=1
type=Spearman,Mage,Bowman,Mage,Red Mage,Longbowman,Pikeman,Swordsman,Javelineer,Cavalryman,Horseman,Mage of Light,Arch Mage,Silver Mage,Master Bowman,Halberdier,Royal Guard,Great Mage,Iron Mauler,Shock Trooper,Heavy Infantryman
role=escapee sidekick 2
[not]
id=Dacyn
[/not]
[not]
[and]
role=escapee leader
[/and]
[/not]
[not]
[and]
role=escapee sidekick 1
[/and]
[/not]
[/role]
[recall]
role=escapee leader
x,y=25,3
[/recall]
[recall]
role=escapee sidekick 1
x,y=24,3
[/recall]
[recall]
role=escapee sidekick 2
x,y=25,4
[/recall]
[store_gold]
side=1
variable=stored_player_gold
[/store_gold]
[if]
[variable]
name=stored_player_gold
greater_than_equal_to=1
[/variable]
[then]
{PLACE_IMAGE items/chest-plain-closed.png 33 11}
[/then]
[/if]
[modify_side]
side=1
gold=0
income=-2
[/modify_side]
[remove_shroud]
side=1
x,y=26,5
[/remove_shroud]
# 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
[not]
x,y=1-999,1-999
[/not]
level=4
[/filter]
kill=no
variable=possible_prisoners
[/store_unit]
[store_unit]
[filter]
side=1
[not]
x,y=1-999,1-999
[/not]
level=3
[/filter]
kill=no
variable=possible_prisoners
mode=append
[/store_unit]
[store_unit]
[filter]
side=1
[not]
x,y=1-999,1-999
[/not]
level=2
[/filter]
kill=no
variable=possible_prisoners
mode=append
[/store_unit]
[store_unit]
[filter]
side=1
[not]
x,y=1-999,1-999
[/not]
level=1
[/filter]
kill=no
variable=possible_prisoners
mode=append
[/store_unit]
[store_locations]
x=15,20,31
y=9,6,8
radius=3
[filter_radius]
terrain=!,X*,*^X*
[/filter_radius]
variable=prisoner_locations
[/store_locations]
# 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]
[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]
#{DEBUG_MSG "ran out of recallable prisoners, creating a new one"}
{RANDOM "Spearman,Cavalryman,Mage,Horseman,Heavy Infantryman"}
[unit]
side=1
type=$random
generate_name=yes
random_traits=yes
x,y=$prisoner_locations[$i].x,$prisoner_locations[$i].y
[/unit]
[/else]
[/if]
{NEXT i}
{CLEAR_VARIABLE possible_prisoners,prisoner_locations,new_prisoner}
{LOYAL_UNIT 2 {ON_DIFFICULTY "Troll" "Troll" "Troll Warrior"} 23 10}
{LOYAL_UNIT 2 {ON_DIFFICULTY "Troll" "Troll" "Troll Warrior"} 23 16}
[+unit]
# This one must not be quick, or it might see an escapee before the
# escapee sees it... it still can, if the escapee is a non-quick HI
# line unit, but it's unlikely the player will scout ahead with one
random_traits=no
[+modifications]
{TRAIT_INTELLIGENT}
[/modifications]
[/unit]
{LOYAL_UNIT 2 {ON_DIFFICULTY "Troll" "Troll Warrior" "Troll Warrior"} 28 18}
{LOYAL_UNIT 2 {ON_DIFFICULTY "Troll" "Troll Warrior" "Troll Warrior"} 26 7}
{LOYAL_UNIT 2 {ON_DIFFICULTY "Troll" "Troll Warrior" "Troll Warrior"} 19 12}
{LOYAL_UNIT 2 "Orcish Warrior" 24 13}
{LOYAL_UNIT 2 "Orcish Warrior" 26 12}
{LOYAL_UNIT 2 "Orcish Warrior" 29 16}
{LOYAL_UNIT 2 "Orcish Warrior" 31 15}
{LOYAL_UNIT 2 "Orcish Warrior" 34 13}
{GENERIC_UNIT 2 "Orcish Grunt" 11 4}
{MODIFY_UNIT (
side=1
[filter_wml]
upkeep=full
[/filter_wml]
) variables.temporary_free_upkeep yes}
{MODIFY_UNIT (
side=1
[filter_wml]
upkeep=full
[/filter_wml]
) upkeep loyal}
{MODIFY_UNIT (
side=1
[not]
role=escapee leader
[or]
role=escapee sidekick 1
[/or]
[or]
role=escapee sidekick 2
[/or]
[/not]
) side 3}
{MODIFY_UNIT side=1 canrecruit yes}
{MODIFY_UNIT side=2 status.guardian yes}
[/event]
[event]
name=start
[message]
speaker=narrator
message= _ "Several of Gweddry's men find themselves locked away in a crude orcish cell."
image=wesnoth-icon.png
[/message]
[message]
role=escapee sidekick 1
message= _ "We've got to get out of here!"
[/message]
[message]
role=escapee sidekick 2
message= _ "I'm sure the commander will come and save us!"
[/message]
[message]
role=escapee sidekick 1
message= _ "What? Didn't you see those huge trolls drag them away? It's hopeless!"
[/message]
[message]
role=escapee leader
message= _ "Be quiet, you two! There's something back here..."
[/message]
{MOVE_UNIT role="escapee leader" 22 2}
[message]
role=escapee leader
message= _ "Look! There's a gap in the wall over here. I think I can slip through if I clear away some of these rocks..."
[/message]
[animate_unit]
flag=attack
[filter]
role=escapee leader
[/filter]
[primary_attack]
range=melee
[/primary_attack]
[facing]
x,y=21,3
[/facing]
hits=yes
[/animate_unit]
[sound]
name=cave-in.ogg
[/sound]
[terrain]
x,y=21,3
terrain=Uu^Dr
[/terrain]
[redraw]
side=1
[/redraw]
[message]
role=escapee leader
message= _ "Come on! This way!"
[/message]
{MOVE_UNIT (role=escapee leader) 21 3}
[objectives]
side=1
[objective]
description= _ "Find Gweddry, Dacyn and Owaec"
condition=win
[/objective]
[objective]
description= _ "Release the other prisoners"
condition=win
[/objective]
[objective]
description= _ "Death of the escapees"
condition=lose
[/objective]
[/objectives]
[/event]
[event]
name=moveto
[filter]
side=1
x=25,26
y= 5, 4
[/filter]
[message]
speaker=unit
message= _ "The door won't open from this side."
[/message]
[/event]
[event]
name=moveto
[filter]
side=1
[filter_location]
x,y=12,4
radius=2
[/filter_location]
[/filter]
[message]
speaker=unit
message= _ "There's strange noises coming from those pits. I don't like this."
[/message]
[event]
name=new turn
{LOYAL_UNIT 2 "Vampire Bat" 8 2}
{LOYAL_UNIT 2 "Vampire Bat" 11 2}
[message]
side,race=2,bat
message= _ "Neep! Neep!" # wmllint: no spellcheck
[/message]
[event]
name=new turn
{LOYAL_UNIT 2 "Vampire Bat" 8 2}
{LOYAL_UNIT 2 "Vampire Bat" 11 2}
[event]
name=new turn
{LOYAL_UNIT 2 "Vampire Bat" 8 2}
[/event]
[/event]
[/event]
[/event]
[event]
name=attack
[filter]
race=bat
[/filter]
[filter_second]
side=1
[/filter_second]
[message]
speaker=second_unit
message= _ "Ack! Get away from me!"
[/message]
[/event]
[event]
name=moveto
[filter]
side=1
x=1-8
y=5-8
[/filter]
[message]
speaker=unit
message= _ "This tunnel seems to go deeper into the caves. We can't go that way."
[/message]
[/event]
[event]
name=moveto
[filter]
side=1
x=12-18
y=15-19
[/filter]
[message]
speaker=unit
message= _ "There's a pile of orcish gear and trash here. The stench is wretched."
[/message]
[/event]
[event]
name=moveto
[filter]
side=1
[/filter]
[filter_condition]
[have_unit]
type=Troll,Troll Warrior
[filter_vision]
side=1
[/filter_vision]
[/have_unit]
[/filter_condition]
[redraw]
side=1
[/redraw]
[message]
speaker=unit
message= _ "The other prison cells should be to the north of that chamber. If we can get past those trolls we could free our comrades."
[/message]
[message]
side=1
[not]
x,y=$x1,$y1
[/not]
message= _ "But there's too many of them!"
[/message]
[message]
speaker=unit
message= _ "Hmm... I have an idea."
[/message]
{VARIABLE unit.variables.undercover yes}
{VARIABLE unit.profile "portraits/disguise.png"}
[unstore_unit]
variable=unit
find_vacant=no
[/unstore_unit]
{MOVE_UNIT id=$unit.id 15 16}
[message]
speaker=narrator
message= _ "After a while..."
image=wesnoth-icon.png
[/message]
[remove_item]
x,y=16,15
[/remove_item]
[object]
id=disguise
silent=yes
[filter]
id=$unit.id
[/filter]
[effect]
apply_to=image_mod
add="O(0)~CROP(0,0,72,72)~BLIT(units/orcs/xbowman.png~TC(1,magenta),0,0)"
[/effect]
[/object]
[if]
[have_unit]
side=1
count=2-99
[/have_unit]
[then]
[message]
id=$unit.id
message= _ "So, how do I look?"
[/message]
[message]
id=$unit.id
message= _ "I'll try to slip past the trolls. You wait here."
[/message]
[/then]
[/if]
[/event]
[event]
name=moveto
[filter]
side=1
[filter_location]
x=23,30
y=11,14
radius=6
[/filter_location]
[/filter]
[remove_shroud]
side=1
x=17-36,12-33
y= 5-18, 7-19
[and]
radius=20
[/and]
[not]
terrain=X*
[filter_adjacent_location]
terrain=X*
count=6
[/filter_adjacent_location]
[/not]
[/remove_shroud]
[message]
speaker=King Dra-Nak
message= _ "Ha-ha! These humans will make excellent slaves in my mines!"
[/message]
[message]
speaker=unit
message={WHISPER _"Opening the cells should confuse the guards for a moment. But I better not get too close to them..."}
[/message]
[/event]
[event]
name=attack
[filter]
side=1
[filter_wml]
[variables]
undercover=yes
[/variables]
[/filter_wml]
[/filter]
[fire_event]
name=exposed
[primary_unit]
x,y=$x1,$y1
[/primary_unit]
[/fire_event]
[/event]
[event]
name=new turn
[filter_condition]
[have_unit]
side=1
[filter_wml]
[variables]
undercover=yes
[/variables]
[/filter_wml]
[filter_adjacent]
type=Troll Warrior,Orcish Warrior,Orcish Warlord
[/filter_adjacent]
[/have_unit]
[/filter_condition]
[fire_event]
name=exposed
[primary_unit]
side=1
[filter_wml]
[variables]
undercover=yes
[/variables]
[/filter_wml]
[/primary_unit]
[/fire_event]
[/event]
[event]
name=exposed
[message]
side=2
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
message= _ "Eh?"
[/message]
[if]
[variable]
name=unit.gender
equals=female
[/variable]
[then]
[message]
speaker=King Dra-Nak
message= _ "Hey! Who are you? Get her!"
[/message]
[/then]
[else]
[message]
speaker=King Dra-Nak
message= _ "Hey! Who are you? Get him!"
[/message]
[/else]
[/if]
[message]
x,y=$x1,$y1
message= _ "Uh oh!"
[/message]
[fire_event]
name=remove disguise
[primary_unit]
x,y=$x1,$y1
[/primary_unit]
[/fire_event]
{MODIFY_UNIT side=2 status.guardian no}
[/event]
[event]
name=moveto
first_time_only=no
[filter]
side=1
[filter_location]
[filter_adjacent_location]
terrain=Re^Xo
adjacent=nw,n,ne
[/filter_adjacent_location]
[/filter_location]
[/filter]
[message]
speaker=unit
message= _ "Here's one of the prison cells! Let me open it..."
[/message]
[sound]
name=open-chest.wav
[/sound]
[store_locations]
terrain=Re^Xo
[filter_adjacent_location]
x,y=$x1,$y1
[/filter_adjacent_location]
variable=adjacent_gate_loc
[/store_locations]
[terrain]
x,y=$adjacent_gate_loc.x,$adjacent_gate_loc.y
terrain=Re
[/terrain]
[remove_item]
x,y=$adjacent_gate_loc.x,$adjacent_gate_loc.y
[/remove_item]
[redraw]
[/redraw]
{MODIFY_UNIT (
side=3
[filter_location]
x,y=$adjacent_gate_loc.x,$adjacent_gate_loc.y
radius=5
[filter_radius]
terrain=!,X*
[/filter_radius]
[/filter_location]
) side 1}
{CLEAR_VARIABLE adjacent_gate_loc}
[/event]
[event]
name=moveto
[filter]
side=1
x=17,18
y=11,10
[/filter]
{MODIFY_UNIT (side,x,y=3,13-16,8-10) side 1}
[message]
x=13-16
y=8-10
message= _ "Finally, we're rescued!"
[/message]
[fire_event]
name=free heroes
[/fire_event]
[/event]
[event]
name=moveto
[filter]
side=1
x=21,22
y=9,8
[/filter]
{MODIFY_UNIT (side,x,y=3,18-22,6-8) side 1}
[message]
x=18-22
y=6-8
message= _ "At last!"
[/message]
[fire_event]
name=free heroes
[/fire_event]
[/event]
[event]
name=moveto
[filter]
side=1
x=28,29
y=9,10
[/filter]
{MODIFY_UNIT (side,x,y=3,29-32,7-9) side 1}
[message]
x=29-32
y=7-9
message= _ "Now let's get out of here!"
[/message]
[fire_event]
name=free heroes
[/fire_event]
[/event]
[event]
name=free heroes
[message]
speaker=King Dra-Nak
message= _ "What? Who's there? Get them!"
[/message]
[fire_event]
name=remove disguise
[primary_unit]
side=1
[filter_wml]
[variables]
undercover=yes
[/variables]
[/filter_wml]
[/primary_unit]
[/fire_event]
{MODIFY_UNIT side=2 status.guardian no}
{MODIFY_UNIT canrecruit,side=yes,1 canrecruit no}
{MODIFY_UNIT (
id=Gweddry
[or]
id=Dacyn
[/or]
[or]
id=Owaec
[/or]
) side 1}
[redraw]
side=1
[/redraw]
[message]
speaker=Dacyn
message= _ "The guards are distracted! Now is the time to escape!"
[/message]
[message]
speaker=Owaec
message= _ "The eastern entrance is teeming with orcs. We have to find another way to exit to the west!"
[/message]
[if]
[variable]
name=stored_player_gold
greater_than_equal_to=1
[/variable]
[then]
[message]
speaker=Gweddry
message= _ "We have to get our gold back first! It must have been taken to their treasury."
[/message]