-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
06_Following_the_Shadow.cfg
614 lines (557 loc) · 18.2 KB
/
06_Following_the_Shadow.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
#textdomain wesnoth-sota
# A large number of bats spawn in the cave under these two conditions:
# (1) Six non-bat units are in the cave (Bats don't stomp on the floor.)
# (2) Ardonna has been in the cave for two turns in a row. (That gets her solidly into
# the cave, but not close to the exit. If she is alone, it's the player's fault when
# the bats kill her.)
[scenario]
name= _ "Following the Shadow"
map_data="{campaigns/Secrets_of_the_Ancients/maps/06_Following_the_Shadow.map}"
id=06_Following_the_Shadow
next_scenario=07_Meeting_of_the_Minds
victory_when_enemies_defeated=no
[story]
[part]
[background_layer]
image=story/book.png
scale=no
[/background_layer]
[if]
[have_unit]
id=Bone Captain
search_recall_list=yes
[/have_unit]
[then]
story=_ "3 IV, 23 YW
I was so sure I had the answer! I was wrong. I wanted to believe that I was imagining it, but it’s now clear that the captain’s memories are fading. He still retains speech, and the others fight better when he is watching (many used to be his crew after all — it would be habit for them), but he remembers precious little else now. The same is true of my other recently-raised friends. I am disappointed, but the existence of my strange new companion keeps me from being depressed."
[/then]
[else]
story=_ "3 IV, 23 YW
I was so sure I had the answer! I was wrong. I wanted to believe that I was imagining it, but my recently-raised friends are losing their memories. They retain the power of speech, but precious little else. I am disappointed, but the existence of my strange new companion keeps me from being depressed."
[/else]
[/if]
[/part]
[part]
[background_layer]
image=portraits/undead/shadow.png
scale=no
base_layer=yes
[/background_layer]
story=_ "The phantom leads us north. It has identified itself as the ghost of Vash-Gorn, an orc. So it remembers! It seems that the problem has been solved, but the ghost ignores all my questions. I am burning with curiosity, so I hope we reach our destination soon! We travel only by day because at night the spirit is practically invisible. We have not had any trouble on the road yet, but we <i>are</i> a rather large company now, so I have not expected it."
[/part]
{JOURNEY_PART 6}
[/story]
{DEFAULT_SCHEDULE}
{DEFAULT_MUSIC_PLAYLIST}
turns=38
#define CAVE_TERRAINS
U*,U*^*,Rb,Rb^*,*^Dr,Qxe,Wwf,Wwg
#enddef
[side]
{SIDE_1_ARDONNA}
{ARDONNA_RECRUIT_3}
{GOLD 200 175 150}
shroud=yes
[/side]
[side]
side=2
controller=ai
user_team_name= _ "Goblin Raiders"
team_name=bad
type=Direwolf Rider
name= _ "Bogdush"
id=Bogdush
facing=sw
recruit=Wolf Rider, Goblin Knight, Goblin Pillager
{GOLD 250 325 400}
[unit]
x,y=46,3
type=Goblin Pillager
moves=0
name= _ "Blaust"
id=Blaust
facing=se
[/unit]
{FLAG_VARIANT6 ragged}
[/side]
[side]
side=3
controller=ai
user_team_name= _ "Bats"
hidden=yes
team_name=bats
no_leader=yes
[ai]
[avoid]
# Bats stay in the cave.
terrain=!,{CAVE_TERRAINS}
[/avoid]
[/ai]
[/side]
[side]
side=4
team_name=good
controller=null
hidden=yes
color=darkred
[/side]
{STARTING_VILLAGES 1 6}
{STARTING_VILLAGES 2 6}
#ifdef HARD
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Goblin Knight) 2}
#endif
# *************************** PRESTART ***************************
[event]
name=prestart
{RECALL_LOYAL_UNITS}
# Using a shroud_data file would work too, but this is easier to modify if
# necessary:
[remove_shroud]
side=1
[/remove_shroud]
[place_shroud]
side=1
terrain={CAVE_TERRAINS}
[/place_shroud]
[place_shroud]
# Shrouded floor next to cave wall leaves part of the cave wall
# unshrouded, showing part of the shape of the cave before it is
# discovered. This tag covers up most of the offending walls. Some of
# them can't be covered without covering the *outside* of the cave
# walls as well, so we are leaving those as they are.
x=41-44, 46, 47, 47-50, 50-54
y=10-14, 8 , 18, 8 , 9-19
[/place_shroud]
[remove_shroud]
# So the player can see the three entrances:
side=1
x=36, 37, 43
y=11, 11, 15
[/remove_shroud]
[objectives]
side=1
[objective]
description= _ "Find out where the ghost went and follow it"
condition=win
[/objective]
{HOW_TO_LOSE_WITH_ARDONNA}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
[time_area]
{UNDERGROUND}
terrain={CAVE_TERRAINS}
[/time_area]
[/event]
# *************************** PLAY ***************************
# Animates bats coming from the chasm in the center of the cave (at 47,13)
#define MOVE_AND_PLACE_BAT X Y TYPE
# X and Y values are passed to the macro, but that location may be occupied. This
# macro finds the nearest unoccupied location in case it is. That is the location
# that will actually be used in case it is different than X and Y.
{NEAREST_HEX {X} {Y} 99 (
[not]
[filter]
[/filter]
[or]
x,y=47,13
[/or]
[/not]) location}
[move_unit_fake]
type={TYPE}
side=3
x=47,$location.x
y=13,$location.y
[/move_unit_fake]
[unit]
type={TYPE}
side=3
x=$location.x
y=$location.y
[/unit]
[clear_variable]
name=location
[/clear_variable]
#enddef
[event]
name=moveto
[filter_condition]
[have_location]
x,y=47,13
[filter_vision]
side=1
[/filter_vision]
[/have_location]
[/filter_condition]
[scroll_to]
x,y=47,13
[/scroll_to]
[delay]
time=1000
[/delay]
[message]
speaker=Ardonna
message= _ "Look, there is a cavern below the cave floor. What might we rouse if we go tromping about in the cave? I hope it is nothing worse than bats."
[/message]
[message]
speaker=Bone Captain
message= _ "Ghost?"
[/message]
[message]
speaker=Ardonna
message= _ "Surely the ghost would not have gone that way, where I cannot follow."
[/message]
# Have a bat fly out of the chasm as a warning.
[delay]
time=1000
[/delay]
#ifdef EASY
{MOVE_AND_PLACE_BAT 43 12 (Vampire Bat)}
#endif
#ifdef NORMAL
{MOVE_AND_PLACE_BAT 43 12 (Blood Bat)}
#endif
#ifdef HARD
{MOVE_AND_PLACE_BAT 43 12 (Dread Bat)}
#endif
[delay]
time=1000
[/delay]
[message]
speaker=Ardonna
message= _ "If there is one bat, there are certainly more. We should be careful."
[/message]
[/event]
[event]
name=moveto
[filter_condition]
[have_location]
x,y=53,20
[filter_vision]
side=1
[/filter_vision]
[/have_location]
[/filter_condition]
[scroll_to]
x,y=53,20
[/scroll_to]
[delay]
time=500
[/delay]
[message]
speaker=Ardonna
message= _ "There is a tunnel at the back of the cave! The ghost must have gone through there."
[/message]
{HIGHLIGHT_IMAGE 53 20 "items/gohere.png" ()}
[remove_item]
x,y=53,20
[/remove_item]
[objectives]
side=1
[objective]
description= _ "Move Ardonna to the tunnel"
condition=win
[/objective]
{HOW_TO_LOSE_WITH_ARDONNA}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
[/event]
# If we don't do this, the first wolf attacks by himself, leaving him little
# chance of surviving or doing much damage.
[event]
name=side 2 turn 1 refresh
[modify_unit]
[filter]
id=Blaust
[/filter]
moves=0
attacks_left=0
[/modify_unit]
[/event]
# This checks to see if the conditions are correct for activating the bats. The
# bats will spawn as their turn ends, so they can't spawn and attack at the same
# time. (Which would be a bad surprise.) This way, the player gets one turn to
# arrange their defenses.
[event]
name=side 3 turn end
first_time_only=no
id=check_for_bat_activation
# If Ardonna is not in the cave, reset (or set) a counter.
[if]
[have_unit]
id=Ardonna
[filter_location]
terrain=!,{CAVE_TERRAINS}
[/filter_location]
[/have_unit]
[then]
[set_variable]
name=turns_in_cave
value=0
[/set_variable]
[/then]
[/if]
# If Ardonna *is* in the cave, increment the counter.
[if]
[have_unit]
id=Ardonna
[filter_location]
terrain={CAVE_TERRAINS}
[/filter_location]
[/have_unit]
[then]
[set_variable]
name=turns_in_cave
add=1
[/set_variable]
[/then]
[/if]
# If Ardonna's counter gets to 2, activate the bats.
[if]
[variable]
name=turns_in_cave
equals=2
[/variable]
[then]
[fire_event]
name=activate bats
[/fire_event]
[/then]
[/if]
# Activate the bats if there are six or more non-flying units in the cave.
[if]
[have_unit]
side=1
[filter_location]
terrain={CAVE_TERRAINS}
[/filter_location]
[not]
race=bats
[/not]
[not]
variation=bat # undead bat
[/not]
count=6-infinity # six or more
[/have_unit]
[then]
[fire_event]
name=activate bats
[/fire_event]
[/then]
[/if]
[/event]
# Four hard-coded, animated bats appear every time, the number of others, which are
# randomly placed, is based on difficulty.
#ifdef EASY
#define NUMBER_OF_EXTRA_BATS
5
#enddef
#endif
#ifdef NORMAL
#define NUMBER_OF_EXTRA_BATS
7
#enddef
#endif
#ifdef HARD
#define NUMBER_OF_EXTRA_BATS
10
#enddef
#endif
[event]
name=activate bats
[remove_event]
# We don't want the bats activated twice:
id=check_for_bat_activation
[/remove_event]
[clear_variable]
name=turns_in_cave
[/clear_variable]
{MOVE_AND_PLACE_BAT 45 11 (Vampire Bat)}
{MOVE_AND_PLACE_BAT 45 14 (Blood Bat)}
{MOVE_AND_PLACE_BAT 47 9 (Blood Bat)}
{MOVE_AND_PLACE_BAT 48 10 (Dread Bat)}
[store_locations]
terrain={CAVE_TERRAINS}
variable=possible_bat_locations
[/store_locations]
[set_variable]
name=bat_index
value=1
[/set_variable]
[while]
[variable]
name=bat_index
less_than_equal_to={NUMBER_OF_EXTRA_BATS}
[/variable]
[do]
# Choose a location by selecting an array index:
[set_variable]
name=location_index
rand="0..$($possible_bat_locations.length-1)"
[/set_variable]
# [while] the location is no good, [do] choose another one:
[while]
[have_location]
x=$possible_bat_locations[$location_index].x
y=$possible_bat_locations[$location_index].y
[filter]
# It's no good because there is already a unit here.
[/filter]
[/have_location]
[or]
[variable]
# It's no good because it's off the edge of the map.
# (It can only go off in the positive x direction.)
name=possible_bat_locations[$location_index].x
greater_than=53
[/variable]
[/or]
[do]
[set_variable]
name=location_index
rand=0.."$($possible_bat_locations.length-1)"
[/set_variable]
[/do]
[/while]
# The bat_index reaches higher with each difficulty level. The
# types of bats are hard-coded instead of random because it can
# make a large difference in the difficulty.
[switch]
variable=bat_index
[case]
value=1, 5, 8
[set_variable]
name=bat_type
value=Vampire Bat
[/set_variable]
[/case]
[case]
value=2, 4, 6, 9
[set_variable]
name=bat_type
value=Blood Bat
[/set_variable]
[/case]
[case]
value=3, 7, 10
[set_variable]
name=bat_type
value=Dread Bat
[/set_variable]
[/case]
[/switch]
# Put a bat on the map at the selected location:
[unit]
type=$bat_type
x=$possible_bat_locations[$location_index].x
y=$possible_bat_locations[$location_index].y
side=3
[/unit]
[set_variable]
name=bat_index
add=1
[/set_variable]
[/do]
[/while]
[message]
speaker=Ardonna
message= _ "So it’s only bats, but rather a lot of them."
[/message]
[clear_variable]
name=possible_bat_locations, bat_index, bat_type, location_index
[/clear_variable]
[/event]
# *************************** OPENING / ENDING ***************************
[event]
name=moveto
[filter]
x,y=53,20
id=Ardonna
[/filter]
[message]
speaker=Ardonna
message= _ "Now let’s see where that ghost went."
[/message]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/event]
[event]
name=start
[unit]
type=Shadow
side=4
id=Shadow
x,y=27,15
facing=sw
[/unit]
[message]
speaker=Shadow
message= _ "Come."
[/message]
[kill]
id=Shadow
[/kill]
[move_unit_fake]
x=27,38
y=15,12
type=Shadow
side=4
[/move_unit_fake]
[message]
speaker=Ardonna
message= _ "Let’s follow it into the cave."
[/message]
[message]
speaker=Blaust
message= _ "I don’t know, Bogdush. The chief said he wanted stuff that was helpful for the war."
[/message]
[message]
speaker=Bogdush
message= _ "It’s a <i>mage</i>! That <i>would</i> be helpful for the war, you idiot! It’s only a pup, and unless I miss my guess, it’s a female too. It will be easy to capture."
[/message]
[message]
speaker=Blaust
message= _ "What about the others? They look like the dead ones back on the Green Isle."
[/message]
[message]
speaker=Bogdush
message= _ "They are. It makes our job of killing them that much easier!"
[/message]
[modify_unit]
[filter]
id=Blaust
[/filter]
facing=sw
[/modify_unit]
[message]
speaker=Ardonna
message= _ "You must be Goblins. You will stand out of my way if you wish to live."
[/message]
[message]
speaker=Bogdush
message= _ "Oh, it’s a mage that makes jokes too! Let’s go."
[/message]
[/event]
[event]
name=time over
[message]
speaker=narrator
image=logo.png
message= _ "You have no more time."
[/message]
[/event]
{HERO_DEATHS}
{MAKE_BATS_NORMAL}
{ZOMBIES}
#undef MOVE_AND_PLACE_BAT
#undef CAVE_TERRAINS
#undef NUMBER_OF_EXTRA_BATS
[/scenario]