/
05_Hide_and_Seek.cfg
744 lines (628 loc) · 19.7 KB
/
05_Hide_and_Seek.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
#textdomain wesnoth-l
[scenario]
id=05_Hide_and_Seek
next_scenario=06_The_Hunters
victory_when_enemies_defeated=no
name= _ "Hide and Seek"
map_file=05_Hide_and_Seek.map
turns=28
{MIDNIGHT}
{MIDNIGHT}
{MIDNIGHT}
{MIDNIGHT}
{MIDNIGHT}
{MIDNIGHT}
{MIDNIGHT}
{MIDNIGHT}
{MIDNIGHT}
{MIDNIGHT}
{MIDNIGHT}
{MIDNIGHT}
{MIDNIGHT}
{MIDNIGHT}
{SECOND_WATCH}
{SECOND_WATCH}
{SECOND_WATCH}
{SECOND_WATCH}
{SECOND_WATCH}
{SECOND_WATCH}
{SECOND_WATCH}
{SECOND_WATCH}
{SECOND_WATCH}
{SECOND_WATCH}
{SECOND_WATCH}
{SECOND_WATCH}
{SECOND_WATCH}
{SECOND_WATCH}
{DAWN}
{INTRO_AND_SCENARIO_MUSIC knolls.ogg underground.ogg}
{EXTRA_SCENARIO_MUSIC the_deep_path.ogg}
{EXTRA_SCENARIO_MUSIC nunc_dimittis.ogg}
[story]
[part]
story= _ "22 Deeproot, 501 YW
Been a tough few days since we left Elensefar with all them patrols running around. Going by boat along the Great River, we has been managing to avoid them Wesnothians, but being constantly on the lookout be real taxing. I truly be starting to feel that tiredness in my bones... old men like me should be sitting back at home, resting our grey bodies and watchin’ over them younger folk growing up. I don’t got no business here, running around as some outlaw. Maybe if I was ten years younger..."
background=story/frontier.webp
[/part]
[part]
story= _ "Anyway, the messenger I sent back to Relana should be in Delwyn already. We should be arriving to Carcyn soon too, to where that coward Maddock said his ‘contact’ be. Truths be told, I don’t know how this’ll be turning out, especially since I don’t be no social butterfly like sis were. Don’t like me no city folk really. But I’ll deal with them if I gots to."
background=story/frontier.webp
[/part]
[/story]
{LIBERTY_BIGMAP {JOURNEY_05_NEW} }
[side]
type=Bandit
id=Baldras
side=1
color=black
canrecruit=yes
controller=human
recruit=Thug,Footpad,Poacher
gold=0
income=-2
village_gold=0
team_name=good_guys
user_team_name=_"Rebels"
shroud=no
fog=yes
share_vision=none
[/side]
[side]
type=Master Bowman
id=Quentin
name= _ "Quentin"
side=2
color=red
canrecruit=yes
controller=ai
user_team_name=_"Weldyn"
team_name=bad_guys
[ai]
ai_algorithm=idle_ai
passive_leader=yes
[/ai]
shroud=no
fog=yes
[/side]
[side]
no_leader=yes
side=3
color=red
controller=ai
team_name=bad_guys
user_team_name=_"Weldyn"
[ai]
aggression=1.0
caution=0.0
grouping=no
simple_targeting=yes
[/ai]
shroud=no
fog=yes
{FLAG_VARIANT loyalist}
[/side]
{STARTING_VILLAGES_ALL 2}
[side]
type=Rogue
id=Hans
name= _ "Hans"
side=4
color=purple
canrecruit=yes
controller=ai
facing=sw
[ai]
passive_leader=yes
[/ai]
team_name=good_guys
user_team_name=_"Rebels"
shroud=no
fog=yes
share_vision=none
{FLAG_VARIANT6 ragged}
[/side]
#
# Prestart events
#
[event]
name=prestart
{PLACE_IMAGE "scenery/oak-leaning.png~FL(horiz)" 12 37}
[store_side]
side=1
variable=stored_side_1
[/store_side]
[objectives]
side=1
[objective]
description= _ "Enter the Grey Woods with Hans"
condition=win
[/objective]
[objective]
description= _ "Death of Baldras"
condition=lose
[/objective]
[objective]
description= _ "Death of Harper"
condition=lose
[/objective]
[objective]
description= _ "Death of Hans"
condition=lose
[/objective]
[note]
description= _ "In fog, units always see one hex further than they can move."
[/note]
{TURNS_RUN_OUT}
[/objectives]
#some various city props
{PLACE_IMAGE scenery/well.png 10 36}
{PLACE_IMAGE items/scarecrow.png 15 22}
{PLACE_IMAGE items/straw-bale1.png 3 23}
{PLACE_IMAGE "items/straw-bale2.png~FL(horiz)" 4 23}
{PLACE_IMAGE "items/straw-bale1.png~FL(horiz)" 4 22}
{PLACE_IMAGE items/straw-bale1.png 32 27}
{PLACE_IMAGE "items/archery-target-right.png~FL(horiz)" 4 44}
{PLACE_IMAGE "items/archery-target-right.png~FL(horiz)" 6 45}
{PLACE_IMAGE "items/archery-target-right.png~FL(horiz)" 5 47}
# Here we preplace a few guards
#define SEEKER X Y TYPE
[unit]
type={TYPE}
generate_name=yes
x,y={X},{Y}
side=2
random_traits=yes
[/unit]
#enddef
{SEEKER 2 45 (Bowman)}
{SEEKER 3 47 (Bowman)}
{RANDOM "a,b,c"}
[switch]
variable=random
[case]
value=a
[store_locations]
x= 7,19,24,30,17,25, 2, 6,18, 2,24,13,16, 3,15,17,30,19, 3,27, 9
y=13, 9,10,13,18,21,22,23,27,28,30,32,32,37,37,38,38,41,42,43,47
variable=guard_locs
[/store_locations]
[/case]
[case]
value=b
[store_locations]
x= 2,25,14,30, 5,16,25, 6, 2,33,16,22,13, 3,15,17,28, 3, 7,21
y=10,10,13,13,19,20,21,23,28,28,31,31,32,37,37,38,39,42,48,48
variable=guard_locs
[/store_locations]
[/case]
[case]
value=c
[store_locations]
x=22, 7,16,26,15, 4,31,19,15,30, 5, 4, 8,15,17,27,19, 3,20
y=12,13,13,15,18,22,23,26,27,29,32,35,35,37,38,39,41,42,46
variable=guard_locs
[/store_locations]
[/case]
[/switch]
[for]
array=guard_locs
# The guard positions are designed to work with 4MP guards only, so
# we need to make sure the guards cannot get the quick trait, and we
# do this by randomizing their traits manually.
[do]
[set_variables]
name=traits_without_quick
[value]
{TRAIT_STRONG}
[/value]
[value]
{TRAIT_RESILIENT}
[/value]
[value]
{TRAIT_FEARLESS}
[/value]
[value]
{TRAIT_INTELLIGENT}
[/value]
[/set_variables]
{VARIABLE_OP first_trait rand "0..3"}
[set_variables]
name=this_guard_traits
to_variable=traits_without_quick[$first_trait].trait
[/set_variables]
# To prevent the same trait from being picked twice, we need to find
# and remove the first picked trait from the array.
[for]
array=traits_without_quick
variable=j
[do]
[if]
[variable]
name=traits_without_quick[$j].trait.id
equals=$traits_without_quick[$first_trait].trait.id
[/variable]
[then]
{CLEAR_VARIABLE traits_without_quick[$first_trait]}
[/then]
[/if]
[/do]
[/for]
{VARIABLE_OP second_trait rand "0..2"}
[set_variables]
name=this_guard_traits
mode=append
to_variable=traits_without_quick[$second_trait].trait
[/set_variables]
{RANDOM "Shock Trooper,Iron Mauler"}
[unit]
type=$random
side=2
x,y=$guard_locs[$i].x,$guard_locs[$i].y
generate_name=yes
random_traits=no
[modifications]
[insert_tag]
name=trait
variable=this_guard_traits
[/insert_tag]
[/modifications]
[/unit]
{CLEAR_VARIABLE this_guard_traits}
[/do]
[/for]
{CLEAR_VARIABLE guard_locs,traits_without_quick,first_trait,second_trait,random}
[store_unit]
[filter]
id=Baldras
[/filter]
kill=yes
variable=stored_Baldras
[/store_unit]
[unit]
side=1
type=Boat
id=Boat
x,y=1,4
[/unit]
[hide_unit]
x,y=1,4
[/hide_unit]
[item]
x,y=1,4
image=units/transport/boat.png
[/item]
[/event]
#
# Starting conversation and actions
#
[event]
name=start
[message]
speaker=narrator
message= _ "Relentlessly pursued by riders patrolling the road to Elensefar, Baldras and the villagers traveled unseen along the swampy banks of the Great River to the city of Carcyn. They hid until nightfall, then crept out to find the help Lord Maddock hinted was here."
image="wesnoth-icon.png"
[/message]
[kill]
x,y=1,4
animate=no
fire_event=no
[/kill]
[remove_item]
x,y=1,4
[/remove_item]
[move_unit_fake]
side=1
type=Boat
x=1,7
y=4,5
[/move_unit_fake]
[item]
x,y=7,5
image=units/transport/boat.png
[/item]
[move_unit_fake]
side=1
type=$stored_Baldras.type
x=7,7
y=5,6
[/move_unit_fake]
[unstore_unit]
variable=stored_Baldras
[/unstore_unit]
[redraw]
side=1
[/redraw]
[recall]
id=Harper
x,y=8,5
[/recall]
[message]
speaker=Harper
message= _ "Wow, is that Carcyn in the distance? Look at how grand some of them spires be!"
[/message]
[message]
speaker=Baldras
message= _ "Not since I were a young lad did I come this far south. Maybe it looks impressive now, but city life weren’t never something real nice. Them city folk be real impatient and mean. Always wantin’ some price for their help, too."
[/message]
[message]
speaker=Harper
message= _ "Well, we need their help now, don’t we? So we got to figure out a way to get to Lord Maddock’s friend. But he didn’t say anything about who that was."
[/message]
[message]
speaker=Baldras
message= _ "Harper, when a noble lord says he don’t want some kind of relationship known, it means some kind o’ connection with the black market. We be looking for criminals, probably some thieves’ den. Or, maybe they be looking for us."
[/message]
[move_unit_fake]
type=Thief
side=4
x=7,6
y=9,6
[/move_unit_fake]
[unit]
type=Thief
side=4
x,y=6,6
random_traits=yes
id=Link
name= _ "Link"
[/unit]
[message]
speaker=Baldras
message= _ "Right on time."
[/message]
[message]
speaker=Harper
message= _ "How do we know we can trust him?"
[/message]
[message]
speaker=Link
message= _ "If you were one of my quarries, your throat would be slit by now. As it is, you two are still in imminent danger. Just a week ago, the Crown sent a contingent of heavy infantry here to supervise the city. They’re patrolling the streets and forests for us."
[/message]
[message]
speaker=Baldras
message= _ "I be assuming they’ll also try to stop us if they see us."
[/message]
[message]
speaker=Link
message= _ "Very likely. Now hurry, you must make it past the city into the Grey Woods. There is a small path in the southeast that leads into the forest. Look for the signpost. My brother Hans will guide you from there. Avoid the soldiers if you can."
[/message]
{HIGHLIGHT_IMAGE 26 48 scenery/signpost.png ()}
[scroll_to_unit]
id=Baldras
[/scroll_to_unit]
{MOVE_UNIT id=Link 5 8}
[kill]
id=Link
animate=no
fire_event=no
[/kill]
[redraw]
[/redraw]
{CLEAR_VARIABLE stored_Baldras}
[/event]
[event]
name=sighted
[filter]
side=2
[/filter]
[filter_second]
side=1
[/filter_second]
[redraw]
side=1
[/redraw]
[message]
speaker=second_unit
message= _ "Looks like these guards be holding stationary posts. If we’re careful, we can get ourselves around them unnoticed."
[/message]
[message]
speaker=Baldras
message= _ "Harper, you younger and faster folks needs to be our eyes. Scout ahead and find a way past them guards, but make sure ya don’t get yourselves spotted..."
[/message]
[/event]
[event]
name=side 2 turn
first_time_only=no
[if]
[have_unit]
side=1
[filter_vision]
visible=yes
side=2
[/filter_vision]
[or]
side=1
[filter_vision]
visible=yes
side=3
[/filter_vision]
[/or]
[/have_unit]
[then]
# if player is visible to enemies, flip all nearby enemies to side 3,
# which is the aggressive side and thus the nearby enemies will begin
# to pursue the player
[modify_unit]
[filter]
side=2
[filter_location]
[filter]
side=1
[/filter]
{QUANTITY radius 8 11 13}
[/filter_location]
[/filter]
side=3
[/modify_unit]
[/then]
[else]
# if player isn't seen by enemies anymore, make all enemies idle again
[modify_unit]
[filter]
side=3
[/filter]
side=2
[/modify_unit]
[/else]
[/if]
[/event]
[event]
name=moveto
[filter]
side=3
[/filter]
[message]
speaker=unit
message= _ "Who goes there? Halt!"
[/message]
[message]
speaker=Harper
message= _ "They’ve seen us! <i>Run</i>!"
[/message]
[/event]
[event]
name=attack_end
[filter]
side=2
[/filter]
[filter_second]
side=1
[/filter_second]
{IF_VAR $second_unit.hitpoints greater_than 0 (
[then]
[message]
speaker=Baldras
message= _ "Quick, back into the shadows! Maybe we can still lose them!"
[/message]
[/then]
)}
[/event]
[event]
name=die
[filter]
type=Iron Mauler
[/filter]
[filter_second]
id=Harper
[/filter_second]
[message]
speaker=Harper
#po: Harper defeats an Iron Mauler
message= _ "Uncle, we did it! We beat one of them iron monsters!"
[/message]
[message]
speaker=Baldras
message= _ "A fine job lass, but more sure gots to be coming. Let’s keep movin’."
[/message]
[set_achievement]
content_for=liberty
id="liberty_iron"
[/set_achievement]
[/event]
[event]
name=sighted
[filter]
id=Hans
[/filter]
[filter_second]
side=1
[/filter_second]
[message]
speaker=unit
message= _ "This way, into the forest! We’ll be able to lose them in the Grey Woods."
[/message]
[/event]
#
# Special event - if someone besides Baldras goes to the end, you get a
# message
#
[event]
name=moveto
[filter]
side=1
[filter_adjacent]
id=Hans
[/filter_adjacent]
[not]
id=Baldras
[/not]
[/filter]
[message]
speaker=Hans
message= _ "You can come if you wish, but we are mostly interested in speaking to Baldras."
[/message]
[allow_undo][/allow_undo]
[/event]
#
# Victory
#
[event]
name=moveto
[filter]
x=26
y=48
id=Baldras
[/filter]
[message]
speaker=Baldras
message= _ "I haven’t run so much in years. Feels like I be a real outlaw now, infiltrating a heavily guarded city relyin’ on nothing but the cover of darkness and my wits."
[/message]
[message]
speaker=Harper
message= _ "It was fun, wasn’t it?"
[/message]
[message]
speaker=Baldras
message= _ "Perhaps a little."
[/message]
[message]
speaker=Hans
message= _ "Enough chatter, you still have some guards on your tail. We need to head deeper into the Grey Woods to lose them."
[/message]
[message]
speaker=Baldras
message= _ "Lead the way."
[/message]
[modify_side]
side=1
gold=$stored_side_1.gold
[/modify_side]
{CLEAR_VARIABLE stored_side_1}
[endlevel]
result=victory
bonus=no
{NEW_GOLD_CARRYOVER 100}
[/endlevel]
[/event]
#
# Loss conditions - turns run out
#
[event]
name=time over
[message]
speaker=Baldras
message= _ "Blast it, we was too slow! With the sun rising already, them guards will have no trouble spotting us now..."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
#
# Death of Hans
#
[event]
name=last breath
[filter]
id=Hans
[/filter]
[message]
speaker=Hans
message= _ "You fools! You weren’t supposed to lead them to me..."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
{LIBERTY_DEATHS}
[/scenario]
#undef SEEKER