-
-
Notifications
You must be signed in to change notification settings - Fork 988
/
02_Dark_Business.cfg
723 lines (654 loc) · 21.4 KB
/
02_Dark_Business.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
#textdomain wesnoth-sota
# Walking corpses are summoned from graves using the right-click menu. Each grave is
# marked by a stone on the map and has its own terrain type. Each can only be used once,
# so a pile of dirt is used to mark one after it is used. After the player captures the
# guardhouse, they can summon skeletons as well, but that ability is lost if the enemy
# units retake it. The opening has some interesting WML to keep Ardonna hidden while
# the guards are talking amongst themselves. It is explained there.
[scenario]
name= _ "Dark Business"
map_data="{campaigns/Secrets_of_the_Ancients/maps/02_Dark_Business.map}"
id=02_Dark_Business
next_scenario=03_Bandits
victory_when_enemies_defeated=no
[story]
[part]
[background_layer]
image=story/cemetery.jpg
scale=no
[/background_layer]
story= _ "16 III, 23 YW:
I decided to hide in the cemetery. That way I could try my experiment to animate a human body when night fell. With my dark cloak, I resembled the mourners, and with my hood up, nobody could see my hair."
[/part]
{JOURNEY_PART 2}
[/story]
{FIRST_WATCH_HOUR3}
{FIRST_WATCH_HOUR3}
{FIRST_WATCH_HOUR4}
{FIRST_WATCH_HOUR4}
{MIDNIGHT_HOUR}
{MIDNIGHT_HOUR}
{SECOND_WATCH_HOUR1}
{SECOND_WATCH_HOUR1}
{SECOND_WATCH_HOUR2}
{SECOND_WATCH_HOUR2}
{SECOND_WATCH_HOUR3}
{SECOND_WATCH_HOUR3}
{SECOND_WATCH_HOUR4}
{SECOND_WATCH_HOUR4}
{SECOND_WATCH_HOUR5}
{SECOND_WATCH_HOUR5}
{SECOND_WATCH_HOUR6}
{SECOND_WATCH_HOUR6}
{DAWN_HOUR}
{DEFAULT_MUSIC_PLAYLIST}
{TURNS 18 18 18}
[side]
{SIDE_1_ARDONNA}
{GOLD 50 40 30}
facing=se
# The scenario won't be shrouded, but some of the intro dialog is:
shroud=yes
[/side]
[side]
side=2
controller=ai
no_leader=yes
user_team_name= _ "Guards"
{FLAG_VARIANT loyalist}
[/side]
# *************************** MACROS ***************************
# This menu item macro is used for "recruiting" walking corpses, skeletons, and skeleton
# archers from graves. UNIT is the unit type, UNIT_STRING is similar but has underscores
# and is used for the id and icon filename. GOLD is the cost (a number).
#define SET_MENU_ITEM_FOR UNIT UNIT_STRING GOLD
# We need a variable to use in the switch statement:
[set_variable]
name=unit_string
value={UNIT_STRING}
[/set_variable]
# The following sentences could be built from the macro arguments, but that might
# make them impossible to translate properly. So, we use a switch statement instead.
[switch]
variable=unit_string
[case]
value=walking_corpse
[set_variable]
name=description_text
value= _ "Raise Walking Corpse (8 Gold)"
[/set_variable]
[/case]
[case]
value=skeleton
[set_variable]
name=description_text
value= _ "Raise Skeleton (15 Gold)"
[/set_variable]
[/case]
[case]
value=skeleton_archer
[set_variable]
name=description_text
value= _ "Raise Skeleton Archer (14 Gold)"
[/set_variable]
[/case]
[/switch]
[clear_variable]
name=unit_string
[/clear_variable]
[set_menu_item]
id=raise_{UNIT_STRING}
description=$description_text
image=units/icons/icon-{UNIT_STRING}.png
[show_if]
[and]
# Show if: This is a grave overlay terrain...
[have_location]
terrain=*^Gryv
x,y=$x1,$y1
# ...within 1 hex of the leader...
[and]
[filter]
id=Ardonna
[/filter]
radius=1
[/and]
[/have_location]
# ...And there is not a unit here already.
[not]
[have_unit]
x,y=$x1,$y1
[/have_unit]
[/not]
[/and]
[/show_if]
[command]
[store_gold]
side=1
variable=gold
[/store_gold]
[if]
[variable]
name=gold
less_than={GOLD}
[/variable]
[then]
[message]
speaker=narrator
image=items/gold-coins-message.png
message=_ "You don't have enough gold to raise that unit."
[/message]
[/then]
[else]
[gold]
side=1
amount=-{GOLD}
[/gold]
# x1 and y1 have to be stored because they can be changed by the
# player right-clicking again during this command:
[set_variable]
name=zombie_x
value=$x1
[/set_variable]
[set_variable]
name=zombie_y
value=$y1
[/set_variable]
[item] # Marks the grave as used.
x,y=$zombie_x,$zombie_y
image=items/dirt.png
[/item]
[delay] # This makes it a bit animated.
time=400
[/delay]
[unit]
side=1
x,y=$zombie_x,$zombie_y
type={UNIT}
animate=yes
moves=0
attacks_left=0
[/unit]
# Remove the overlay that defines this terrain as a grave:
[terrain]
terrain=^
layer=overlay
x,y=$zombie_x,$zombie_y
[/terrain]
[fire_event]
id=more_guards
[/fire_event]
[clear_variable]
name=zombie_x,zombie_y
[/clear_variable]
[/else]
[/if]
[/command]
[/set_menu_item]
#enddef
#define PLACE_GUARD X Y TYPE TRAIT1 TRAIT2 ID NAME
[unit]
type={TYPE}
id={ID}
name={NAME}
x,y={X},{Y}
side=2
facing=sw
[modifications]
{TRAIT_{TRAIT1}}
{TRAIT_{TRAIT2}}
[/modifications]
[/unit]
#enddef
# *************************** PRESTART ***************************
[event]
name=prestart
[hide_unit]
id=Ardonna
[/hide_unit]
[objectives]
side=1
[objective]
description= _ "Kill all the guards, and capture the guardhouse"
condition=win
[/objective]
{HOW_TO_LOSE_WITH_ARDONNA}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[note]
description= _ "Right-click on a grave adjacent to your leader to raise a unit."
[/note]
[note]
description= _ "Each grave can be used only once."
[/note]
[note]
description= _ "This scenario takes place entirely at night."
[/note]
[/objectives]
[label]
x,y=10,11
text= _ "Guardhouse"
immutable=no
[/label]
[item]
x,y=15,7
image=scenery/temple1.png
[/item]
[label]
x,y=15,7
# This label bled into the two hexes on either side, and obscured
# the units there. It's better on two lines. The extra spaces before
# "Temple" are to center that word above the others.
text= _ " Temple
of Healing"
immutable=no
[/label]
[item]
x,y=23,8
image=items/gravestone1.png
[/item]
{PLACE_GUARD 10 11 (Spearman) RESILIENT QUICK "Gwyllin" (_"Gwyllin")}
{PLACE_GUARD 10 10 (Spearman) QUICK RESILIENT "Veomyr" (_"Veomyr")}
{PLACE_GUARD 8 10 (Spearman) STRONG RESILIENT "Syrillin" (_"Syrillin")}
{PLACE_GUARD 7 10 (Bowman) STRONG INTELLIGENT "Glant" (_"Glant")}
#ifdef HARD
{PLACE_GUARD 8 9 (Spearman) STRONG INTELLIGENT "Renvan" (_"Renvan")}
{PLACE_GUARD 10 9 (Bowman) STRONG RESILIENT "Vin" (_"Vin")}
#endif
#ifdef EASY
{PLACE_GUARD 9 10 (Lieutenant) AGED INTELLIGENT "Caradoc" (_"Caradoc")}
#else
{PLACE_GUARD 9 10 (Lieutenant) RESILIENT INTELLIGENT "Caradoc" (_"Caradoc")}
#endif
# We don't want the guard on the village to move from there:
{FREEZE_UNIT Gwyllin}
[store_locations]
terrain=*^Gryv
variable=graves
[/store_locations]
[for]
array=graves
variable=i
[do]
[set_variable]
name=stone_number
rand=1..3
[/set_variable]
[item]
x=$graves[$i].x
y=$graves[$i].y
image=items/gravestone$stone_number|.png
[/item]
[/do]
[/for]
[clear_variable]
name=graves,stone_number
[/clear_variable]
{SET_MENU_ITEM_FOR (Walking Corpse) walking_corpse 8}
[/event]
# *************************** PLAY ***************************
[event]
name=side 1 turn end
# Remove the (invisible) keep:
[terrain]
terrain=^
layer=overlay
x=20, 21, 22
y=6-7, 7-8, 7
[/terrain]
[/event]
[event]
name=capture
first_time_only=no
[filter]
side=1
x,y=10,11
[/filter]
[allow_recruit]
type=Skeleton,Skeleton Archer
side=1
[/allow_recruit]
[message]
speaker=narrator
# This puts images of the two units next to each other,
# scaled to the same size:
image=story/black-background.png~BLIT(portraits/undead/archer.png~SCALE(180,180),6,25 )~BLIT(portraits/undead/skeleton.png~SCALE(220,220),187,0)~CROP(0,0,376,205)~SCALE(171,93)
message= _ "You can now recruit skeletons and skeleton archers!"
[/message]
[set_variable]
name=can_recruit_skeletons
value=yes
[/set_variable]
[fire_event]
name=guards_emerge
[/fire_event]
{SET_MENU_ITEM_FOR (Skeleton) skeleton 15}
{SET_MENU_ITEM_FOR (Skeleton Archer) skeleton_archer 14}
[fire_event]
name=check for win
[/fire_event]
[/event]
# This macro animates guards moving out of the guardhouse. Each guard moves to the
# nearest unoccupied, walkable, hex, without an ^Nhyr overlay. ^Nhyr ("Not here") marks
# hexes outside the fence where the unit shouldn't be placed. We use it because it's made
# to be invisible in the minimap. ^Fnzb is the base fence tile.
#define MOVE_AND_PLACE_GUARD TRAIT1 TRAIT2 ID NAME
{NEAREST_HEX 10 11 20 (
[and]
terrain=!,*^Nhyr,*^Qov,*^Fnzb
[not]
x,y=10,11
[/not]
[not]
[filter]
[/filter]
[/not]
[/and] ) location}
[move_unit_fake]
type=Spearman
x=10, $location.x
y=11, $location.y
side=2
[/move_unit_fake]
{PLACE_GUARD $location.x $location.y (Spearman) {TRAIT1} {TRAIT2} {ID} {NAME}}
[clear_variable]
name=location
[/clear_variable]
#enddef
[event]
name=guards_emerge
first_time_only=yes
{MOVE_AND_PLACE_GUARD STRONG RESILIENT "Blollyn" (_"Blollyn")}
{MOVE_AND_PLACE_GUARD INTELLIGENT RESILIENT "Ceoran" (_"Ceoran")}
#ifdef HARD
{MOVE_AND_PLACE_GUARD INTELLIGENT QUICK "Vindry" (_"Vindry")}
{MOVE_AND_PLACE_GUARD STRONG QUICK "Aethacyn" (_"Aethacyn")}
{MOVE_AND_PLACE_GUARD STRONG INTELLIGENT "Elomyr" (_"Elomyr")}
#endif
[/event]
# A capture event does not fire when a leaderless side takes a village, but that is
# what we need. The filters make this event fire when a unit from side 2 retakes the
# "guardhouse" village. The can_recruit_skeletons variable is used to check whether
# side 1 owned the village before.
[event]
name=moveto
first_time_only=no
[filter]
side=2
x,y=10,11
[/filter]
[filter_condition]
[variable]
name=can_recruit_skeletons
equals=yes
[/variable]
[/filter_condition]
[disallow_recruit]
type=Skeleton,Skeleton Archer
side=1
[/disallow_recruit]
[message]
speaker=narrator
image=logo.png
message= _ "You can no longer recruit skeletons and skeleton archers."
[/message]
[clear_menu_item]
id=raise_skeleton_archer, raise_skeleton
[/clear_menu_item]
[set_variable]
name=can_recruit_skeletons
value=no
[/set_variable]
[/event]
[event]
name=die
first_time_only=no
[filter]
side=2
[/filter]
[fire_event]
name=check for win
[/fire_event]
[/event]
[event]
name=check for win
first_time_only=no
[if]
[and]
[have_location]
x,y=10,11
owner_side=1
[/have_location]
[not]
[have_unit]
side=2
[/have_unit]
[/not]
[/and]
[then]
[clear_variable]
name=can_recruit_skeletons,gold,description_text,unit_string
[/clear_variable]
[clear_menu_item]
id=raise_skeleton_archer, raise_skeleton, raise_walking_corpse
[/clear_menu_item]
[allow_recruit]
type=Walking Corpse
side=1
[/allow_recruit]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/then]
[/if]
[/event]
[event]
name=recruit,recall
id=more_guards
[message]
speaker=Ardonna
#ifdef HARD
message= _ "Wait, that guard said there were twelve of them, so where are the other five?"
#else
message= _ "Wait, that guard said there were seven of them, so where are the other two?"
#endif
[/message]
[/event]
# *************************** OPENING / ENDING ***************************
[event]
name=start
[place_shroud]
side=1
[/place_shroud]
[remove_shroud]
side=1
x,y=9,11
radius=5
[/remove_shroud]
[message]
speaker=Syrillin
message= _ "Why are we stuck guarding a cemetery all night?"
[/message]
[message]
speaker=Veomyr
image=portraits/humans/spearman-2.png
#ifdef HARD
message= _ "And why <i>twelve</i> of us? Who wants to break into a cemetery that badly?"
#else
message= _ "And why <i>seven</i> of us? Who wants to break into a cemetery that badly?"
#endif
[/message]
[message]
speaker=Glant
message= _ "I don’t know, but this evening a mage from the academy was here talking to the mayor, my brother says."
[/message]
[message]
speaker=Caradoc
message= _ "Well <i>I</i> say you shouldn’t question orders, so pipe down."
[/message]
[place_shroud]
side=1
[/place_shroud]
# Until now, Ardonna has been invisible. To keep her from clearing the
# shroud around her until she is revealed in the graveyard, she started
# buried in the middle of a void. The void kept her from seeing anything.
# She is not in her starting location though. The position where we actually
# want her to start would take a lot of work to un-void, so she was at the
# edge of the map in a place where we wanted only hill terrain.
[teleport]
[filter]
id=Ardonna
[/filter]
x,y=22,7
animate=no
clear_shroud=no
check_passability=no
[/teleport]
[terrain] # Turn void into hills
terrain=Hh
[and]
terrain=Xv
[/and]
[/terrain]
[unhide_unit]
id=Ardonna
[/unhide_unit]
[remove_shroud]
side=1
x,y=22,7
radius=5
[/remove_shroud]
[message]
speaker=Ardonna
message= _ "They must be guarding the cemetery from <i>me</i>! Maybe Aimucasur really was suspicious. It’s a good thing I’m here already, but how am I going to get out?
Well, I might as well do my experiment and worry about leaving later."
[/message]
[item]
x,y=23,8
image=items/dirt.png
[/item]
[delay]
time=400
[/delay]
[unit]
side=1
x,y=23,8
id=first_zombie
type=Walking Corpse
animate=yes
moves=0
attacks_left=0
facing=nw
[/unit]
[message]
speaker=Ardonna
message= _ "Hello?"
[/message]
[message]
speaker=first_zombie
image=portraits/zombie-farmer.png
message= _ "Uhngh."
[/message]
[message]
speaker=Ardonna
message= _ "Do you remember anything?"
[/message]
[message]
speaker=first_zombie
image=portraits/zombie-farmer.png
message= _ "Uhrrr."
[/message]
[message]
speaker=Ardonna
message= _ "It seems that my first guess was correct. The poor creature is mindless."
[/message]
[place_shroud]
side=1
[/place_shroud]
[remove_shroud]
side=1
x,y=9,11
radius=5
[/remove_shroud]
[message]
speaker=Veomyr
image=portraits/humans/spearman-2.png
message= _ "I heard something over there!"
[/message]
[modify_unit]
[filter]
side=2
[/filter]
facing=ne
[/modify_unit]
[message]
speaker=Glant
message= _ "Who’s there?"
[/message]
[remove_shroud]
side=1
[/remove_shroud]
[move_unit]
id=Ardonna
to_x=21
to_y=7
[/move_unit]
[modify_unit]
# This is not really necessary at the moment (as of 1.11.7) because
# dark adepts can't face north anyway. This is in case that changes.
[filter]
id=Ardonna
[/filter]
facing=sw
[/modify_unit]
[message]
speaker=Ardonna
message= _ "It’s only me. Is the cemetery closed then? I was about to leave."
[/message]
[message]
speaker=Syrillin
message= _ "You and that... other person. Who is that?"
[/message]
[message]
speaker=Ardonna
message= _ "Oh, him. See here, I don't want any trouble, but he is a little... ah..."
[/message]
[message]
speaker=Caradoc
message= _ "He's <i>dead</i>! This is dark sorcery like in my granddad’s time in the old country! The penalty is death. Attack and destroy them both!"
[/message]
[message]
speaker=Ardonna
message= _ "Hey! Don't do that, or I will need more of them."
[/message]
[message]
speaker=Ardonna
message= _ "I would do better if I had weapons, and I bet I can find some in the guardhouse. Go take it, my companions."
[/message]
[message]
speaker=Caradoc
message= _ "Gwyllin, don’t move from that guardhouse."
[/message]
[message]
speaker=narrator
image=logo.png
message= _ "You can recruit or recall from your starting position on the first turn only. To get more units, raise them from their graves."
[/message]
[/event]
[event]
name=time over
[message]
speaker=Ardonna
message= _ "The morning has come, and we have not escaped the city. We will be caught for sure!"
[/message]
[/event]
{HERO_DEATHS}
{MANAGE_PROFILE}
#undef PLACE_GUARD
#undef MOVE_AND_PLACE_GUARD
#undef SET_MENU_ITEM_FOR
[/scenario]