/
04_Becalmed.cfg
659 lines (598 loc) · 18.7 KB
/
04_Becalmed.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
#textdomain wesnoth-sota
# During the opening, characters move in and out of the trapdoors leading below decks,
# and into the passenger cabin doors as well. Macros open and close the various doors as
# necessary. A menu item is provided to remove the terrain image that
# contains the ship's sails. The macro for that is in utils because it is also used for
# the next scenario. The ship terrain is fairly complicated, but the terrain files have
# more details. The ship is the reason for SotA-only bats: Normal bats are drawn above
# all terrain, but that looks wrong with the ship sails, so SotA bats are drawn on a
# lower z-level.
[scenario]
name= _ "Becalmed"
map_data="{campaigns/Secrets_of_the_Ancients/maps/04_Becalmed.map}"
id=04_Becalmed
next_scenario=05_Blackwater
[story]
[part]
[background_layer]
image=story/book.png
scale=no
[/background_layer]
story= _ "22 III, 23 YW
Research sometimes requires experiments, so I began. I forced my will into the life-force pathways of the bandit, thus turning him into my puppet. He resisted, but on account of my recent practice, my will proved the stronger. More strangely, the inside of his body also resisted, attacking me, the invader. However, since I wasn’t physically there, it ended up attacking itself! Over a period of hours, slabs of flesh became weak and threatened to fall off his frame. I was obliged to stitch them in place."
[/part]
[part]
[background_layer]
image=story/black-background.png
scale=no
base_layer=yes
[/background_layer]
[image]
file=portraits/ardonna.png
x,y=64,0
scale=no
[/image]
[image]
file=portraits/undead/ghoul.png~FL()
x,y=320,0
scale=no
[/image]
story= _ "Some of the bandit’s companions had perished in better condition than the leader, and I got the idea to add their flesh to my puppet. I stitched on muscles where they seemed to fit, and used enchantments to improve the bonding, thus improving the strength of the creature. At first, each new piece of flesh caused another violent reaction from the body’s defenses. Eventually, the reactions weakened, and the body stabilized in its new configuration, though by this time it was suppurating and unrecognizable. The mind inside gibbered at what it had become, but the bandit had wished for me a fate worse than death, so it didn’t seem unfair."
[/part]
[part]
[background_layer]
image=story/alduin-dock.jpg
scale=no
[/background_layer]
story= _ "Working through the next day in the bandit’s own keep, I repeated the procedure on several of his gravely wounded companions, though none of them became as strong a specimen as the leader. One of them didn’t survive, but it was no loss — I conscripted him into my army anyway. Then, I made my way to the docks, and under the cover of night, loaded my army into the hold of the waiting ship. The following afternoon, I embarked as a normal passenger."
[/part]
[part]
[background_layer]
image=story/becalmed.jpg
scale=no
[/background_layer]
story= _ "25 III, 23 YW
The journey started well enough, but on the dawn following our departure, the wind died completely, and we were stranded. There was enough food for the paying passengers for a couple days of this, but none for my companions, and the living ones soon got hungry. When one of the crew disappeared on the second evening, I suspected the cause. I was not wrong."
[/part]
{JOURNEY_PART 4}
[/story]
# This is the same as the default schedule, but starts at dusk.
{DUSK}
{FIRST_WATCH}
{SECOND_WATCH}
{DAWN}
{MORNING}
{AFTERNOON}
[time_area]
[time]
id=lower_deck
name= _ "Underground"
image=misc/time-schedules/schedule-underground.png
lawful_bonus=-25
red=-35
green=-30
blue=-25
[/time]
x=14, 0-99
y=12, 13-99
[/time_area]
{DEFAULT_MUSIC_PLAYLIST}
{TURNS 14 15 16}
[side]
{SIDE_1_ARDONNA}
{ARDONNA_RECRUIT_3}
# We are assuming substantial gold from the previous scenario:
{GOLD 60 40 20}
facing=ne
[/side]
[side]
side=2
controller=ai
team_name=bad
user_team_name= _ "Ship’s Crew"
type=Sea Captain
name= _ "Rudic"
id=Rudic
profile=portraits/captain.png
recruit=Sailor
{GOLD 80 110 150}
income=6
facing=sw
color=white
[/side]
# These two sides are only to provide color and ellipses for the other ship
# passengers. The units look out of place without them.
[side]
side=3
team_name=good
controller=null
hidden=yes
color=teal
[unit]
type=Noble
x,y=11, 7
facing=se
[/unit]
[/side]
[side]
side=4
team_name=good
controller=null
hidden=yes
color=orange
[unit]
type=Dunefolk
x,y=12, 16
facing=se
[/unit]
[/side]
{STARTING_VILLAGES 2 8}
#define OPEN_TRAP_DOORS X Y
[remove_item]
x,y={X},{Y}
image=items/trap-doors-closed.png
[/remove_item]
[item]
x,y={X},{Y}
image=items/trap-doors-open.png
[/item]
#enddef
#define CLOSE_TRAP_DOORS X Y
[remove_item]
x,y={X},{Y}
image=items/trap-doors-open.png
[/remove_item]
[item]
x,y={X},{Y}
image=items/trap-doors-closed.png
[/item]
#enddef
# *************************** PRESTART ***************************
[event]
name=prestart
{FREEZE_UNIT Rudic} # Otherwise, he attacks suicidally on the first turn!
[item]
x,y=10,8
image=items/trap-doors-closed.png
[/item]
[item]
x,y=14,6
image=items/trap-doors-closed.png
[/item]
[item]
x,y=13,15
image=items/trap-doors-closed.png
[/item]
[unit]
type=Ghoul
side=1
name= _ "Garcyn"
x,y=recall,recall
[modifications]
{TRAIT_STRONG}
[/modifications]
[/unit]
[objectives]
side=1
[objective]
description= _ "Defeat the enemy leader"
condition=win
[/objective]
{HOW_TO_LOSE_WITH_ARDONNA}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[note]
description= _ "You can recruit from anywhere on the two highest decks."
[/note]
[note]
description= _ "Barrels act as villages."
[/note]
[note]
description= _ "Right-click to simplify the ship graphics."
[/note]
[/objectives]
[set_variable]
name=sails_hidden
value=no
[/set_variable]
{SHOW_SAILS_MENU_ITEM -1}
{HIDE_SAILS_MENU_ITEM -1}
[tunnel]
[source]
x,y=10,8
[/source]
[target]
x,y=10,16
[/target]
[filter]
[/filter]
pass_allied_units=yes
[/tunnel]
[tunnel]
[source]
x,y=14,6
[/source]
[target]
x,y=14,14
[/target]
[filter]
[/filter]
pass_allied_units=yes
[/tunnel]
[item]
x,y=11,12
halo=map-border.png
[/item]
[/event]
# *************************** PLAY ***************************
#define MOVE_TO_LOWER_DECK X Y
[move_unit]
x,y={X},{Y}
to_x=14
to_y=6
[/move_unit]
[teleport]
[filter]
x,y=14,6
[/filter]
x,y=14,14
animate=yes
[/teleport]
[move_unit]
x,y=14,15
to_x=13
to_y=16
[/move_unit]
#enddef
# This next event scripts the first turn AI moves. If we don't do this, sometimes too
# many units go to the lower deck, and sometimes none do. This has a large impact on
# the difficulty of the scenario. Also, the ai units would box in the player's units and
# block the trapdoor.
[event]
name=side 2 turn 1 refresh
# If Ardonna has (stupidly) moved onto the main deck, the scripted moves
# will cause the ai to ignore her zone of control and the ai units could
# move behind her. To prevent this, we will skip the scripted moves and let
# the ai attack her if she has moved off her deck or in range.
[if]
[have_unit]
id=Ardonna
[filter_location]
terrain=*^Zfoc # Ship forecastle
[or]
# She can take one of the first two barrels on the
# lower deck. The AI can't possibly kill her, so it
# will stick to the script. She's fair game on the
# third barrel though.
x=1-10
y=11-99
[/or]
[or]
# She also doesn't get *immediately* attacked if she
# is just guarding her trapdoor.
x=9,10
y=8
[/or]
[/filter_location]
[/have_unit]
[then]
[move_unit]
x,y=15,6
to_x=11
to_y=7
[/move_unit]
[move_unit]
y=6
to_x=13
to_y=8
[/move_unit]
{MOVE_TO_LOWER_DECK 14 5}
{MOVE_TO_LOWER_DECK 15 5}
[modify_unit]
[filter]
side=2
[/filter]
moves=0
[/modify_unit]
[/then]
[/if]
[/event]
#undef MOVE_TO_LOWER_DECK
# Force more newly-recruited units to guard the lower deck:
[event]
name=side 2 turn 1 end
[micro_ai]
side=2
ai_type=zone_guardian
action=add
[filter]
y=6
[/filter]
[filter_location]
x=0-99
y=0-12
[/filter_location]
[filter_location_enemy]
x=0-99
y=13-99
[/filter_location_enemy]
[/micro_ai]
[/event]
# We need an event for each trap door, going each direction. The code for each is very
# similar so we can make all four with one macro.
#define CREATE_TRAP_DOOR Y1 Y2 TRAP_X TRAP_Y
[event]
name=exit_hex
first_time_only=no
[if]
# Checking the unit's x position is not necessary. There is only one
# way the unit's y position can change by the amount being used here:
[variable]
name=y1
equals={Y1}
[/variable]
[and]
[variable]
name=y2
equals={Y2}
[/variable]
[/and]
[then]
{OPEN_TRAP_DOORS {TRAP_X} {TRAP_Y}}
[/then]
[/if]
[allow_undo][/allow_undo]
[/event]
#enddef
{CREATE_TRAP_DOOR 8 16 10 8}
{CREATE_TRAP_DOOR 16 8 10 8}
{CREATE_TRAP_DOOR 6 14 14 6}
{CREATE_TRAP_DOOR 14 6 14 6}
#undef CREATE_TRAP_DOOR
[event]
name=moveto
first_time_only=no
{CLOSE_TRAP_DOORS 10 8}
{CLOSE_TRAP_DOORS 14 6}
[allow_undo][/allow_undo]
[/event]
# *************************** OPENING / ENDING ***************************
#define OPEN_DOOR X Y
[item]
x,y={X},{Y}
image=items/door-open-bottom.png
redraw=no
[/item]
[item]
x={X}
y="$({Y}-1)"
image=items/door-open-top.png
[/item]
[redraw][/redraw]
#enddef
#define CLOSE_DOOR X Y
[remove_item]
x={X}
y="$({Y}-1)"
[/remove_item]
[remove_item]
x,y={X},{Y}
[/remove_item]
#enddef
#define PLACE_SAILOR
{NEAREST_HEX 16 6 3 (terrain=*^Zpoo
[not][filter][/filter][/not]) location}
[unit]
x=$location.x
y=$location.y
type=Sailor
side=2
facing=sw
[/unit]
[clear_variable]
name=location
[/clear_variable]
#enddef
[event]
name=start
[scroll_to]
x,y=12,6
[/scroll_to]
[delay]
time=1000
[/delay]
# Ghoul added to side recruit this scenario
[message]
speaker=narrator
image=portraits/undead/ghoul.png~SCALE(93, 93)
message= _ "You can now recruit ghouls!"
[/message]
[scroll_to]
x,y=12,15
[/scroll_to]
[delay]
time=700
[/delay]
# Joc the sailor comes upstairs to talk to the captain:
{OPEN_TRAP_DOORS 13 15}
[delay]
time=400
[/delay]
[move_unit_fake]
type=Sailor
side=2
x=13, 14
y=15, 14
[/move_unit_fake]
{CLOSE_TRAP_DOORS 13 15}
{OPEN_TRAP_DOORS 14 6}
[move_unit_fake]
type=Sailor
side=2
x=14, 16
y=6, 6
[/move_unit_fake]
[unit]
side=2
x,y=16, 6
type=Sailor
name=_ "Joc"
id=Joc
facing=nw
[/unit]
{CLOSE_TRAP_DOORS 14 6}
[message]
speaker=Joc
message= _ "I found Janryn in the hold. Or, ah... some of him. He’s dead. I didn’t stay to find out what killed him, but there was someone shuffling around in the shadows, and he smelled foul."
[/message]
[message]
speaker=Rudic
message= _ "Murderous stowaways on my ship? I won’t have it! Go round up the rest of the crew and get them up here. We’re going hunting. All passengers are confined to quarters immediately."
[/message]
# Joc goes back down and through the bottom trap door:
[kill]
id=Joc
[/kill]
{OPEN_TRAP_DOORS 14 6}
[move_unit_fake]
type=Sailor
side=2
x=16, 14
y=6, 6
[/move_unit_fake]
{CLOSE_TRAP_DOORS 14 6}
{OPEN_TRAP_DOORS 13 15}
[move_unit_fake]
type=Sailor
side=2
x=14, 13
y=14, 15
[/move_unit_fake]
{CLOSE_TRAP_DOORS 13 15}
# The other two passengers go through doors and disappear:
[kill]
side=4
[/kill]
{OPEN_DOOR 14 13}
[move_unit_fake]
type=Dunefolk
side=4
x=12, 14
y=16, 13
[/move_unit_fake]
{CLOSE_DOOR 14 13}
{OPEN_TRAP_DOORS 10 8}
[kill]
side=3
[/kill]
[move_unit_fake]
type=Noble
side=3
x=11, 10
y=7, 8
[/move_unit_fake]
{CLOSE_TRAP_DOORS 10 8}
{OPEN_DOOR 16 14}
[move_unit_fake]
type=Noble
side=4
x=10, 16
y=16, 14
[/move_unit_fake]
{CLOSE_DOOR 16 14}
{REPEAT 5 {PLACE_SAILOR}}
[message]
speaker=Rudic
message= _ "You! Dark girl. Why are you not in your cabin?"
[/message]
[message]
speaker=Ardonna
message= _ "What if I said something in defense of the stowaways?"
[/message]
[message]
speaker=Rudic
message= _ "I would pitch you over the side with them. What do you know?"
[/message]
[message]
speaker=Ardonna
message= _ "They are my companions, and the poor things are just terribly hungry. I’m sorry we didn’t pay the full amount, but maybe we can reach some arrangement."
[/message]
[message]
speaker=Rudic
message= _ "They killed my crew member and played me for a fool! The only arrangement that suits me is the lot of you off my ship, preferably at the bottom of the sea."
[/message]
[message]
speaker=Ardonna
message= _ "Oh dear. We must do this again. Come to me my friends! If you are still hungry, feed on a passenger first."
[/message]
[/event]
[event]
name=die
[filter]
id=Rudic
[/filter]
[message]
speaker=Ardonna
message= _ "Good riddance. But, with the captain dead, who will sail the ship and guide us into port now?"
[/message]
[message]
speaker=Ardonna
message= _ "Rise Captain, and please retain your memories."
[/message]
[store_unit]
[filter]
id=Rudic
[/filter]
variable=rudic_stored
kill=yes
[/store_unit]
[unit]
type=Bone Captain
id=Bone Captain
side=1
x=$rudic_stored.x
y=$rudic_stored.y
name= _ "Rudic"
{IS_LOYAL}
[modifications]
{TRAIT_LOYAL}
[/modifications]
animate=yes
[/unit]
[clear_variable]
name=rudic_stored
[/clear_variable]
[message]
speaker=Ardonna
message= _ "Can you still sail this ship?"
[/message]
[message]
speaker=Bone Captain
image=portraits/bone-captain1.png
message= _ "Sail. Yes. Need wind."
[/message]
[message]
speaker=Ardonna
message= _ "Oh! It worked! Take us to port, Captain, as soon as you do have the wind."
[/message]
[/event]
[event]
name=enemies defeated
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/event]
{HERO_DEATHS}
{TRANSFORM_BATS_FOR_SHIP}
{ZOMBIES}
{MANAGE_PROFILE}
#undef PLACE_SAILOR
#undef OPEN_DOOR
#undef CLOSE_DOOR
#undef OPEN_TRAP_DOORS
#undef CLOSE_TRAP_DOORS
[/scenario]