/
10_Merfolk_Revenge.cfg
550 lines (509 loc) · 17.1 KB
/
10_Merfolk_Revenge.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
#textdomain wesnoth-sota
# At the end of this scenario, Ras-Tabahn and his army and gold have to be stored so they
# can be brought back when R-T rejoins Ardonna. There is some dialog about having at
# least 50 gold because that's probably necessary to win Entering_the_Northlands on hard.
# EtN is the next scenario chronologically, but not the next in the game, so having to
# come all the way back to this scenario for more gold would be annoying--hence the tip.
# You get the ability to recruit chocobones when a unit inspects the bones of a
# flightless bird half-buried in the sand. There is one long event for this. Almost the
# same event appears in Mountain_Pass if the player doesn't find the bones here.
[scenario]
name= _ "Merfolk Revenge"
map_data="{campaigns/Secrets_of_the_Ancients/maps/10_Merfolk_Revenge.map}"
id=10_Merfolk_Revenge
next_scenario=11_Battleground
[story]
[part]
[background_layer]
image=portraits/merfolk/triton.png
scale=no
[/background_layer]
story= _ "Ras-Tabahn’s party reached the end of the elf road near the Great River where they were to wait for Ardonna. As they arrived, another party did as well."
[/part]
{JOURNEY_PART 10}
[/story]
{DEFAULT_SCHEDULE}
{DEFAULT_MUSIC_PLAYLIST}
{TURNS 25 26 27}
[side]
{SIDE_1_RAS-TABAHN}
{RAS-TABAHN_RECRUIT_2}
{GOLD 150 130 110}
[/side]
{STARTING_VILLAGES 2 5}
{STARTING_VILLAGES 1 5}
[side]
side=2
controller=ai
user_team_name= _ "Merfolk"
type=Merman Triton
name= _ "Okean"
id=Okean
recruit=Merman Netcaster, Merman Fighter, Merman Hunter, Mermaid Initiate
color=purple
facing=sw
{GOLD 210 290 370}
{FLAG_VARIANT long}
[ai]
caution=3
recruitment_diversity=3.0
[/ai]
[/side]
# *************************** PRESTART ***************************
[event]
name=prestart
[objectives]
side=1
[objective]
description= _ "Defeat the enemy leader"
condition=win
[/objective]
{HOW_TO_LOSE_WITH_RAS-TABAHN}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
# Only one Shynal will be recalled.
[recall]
id=Shynal
x,y=8,14
[/recall]
[recall]
id=Corpse Shynal
x,y=8,14
[/recall]
[recall]
id=Carcyn
x,y=8,15
[/recall]
[set_variable]
name=bird_bones_found
value=no
[/set_variable]
[item]
x,y=32,12
image=items/bird-bones.png
[/item]
[/event]
[event]
name=start
[/event]
# *************************** PLAY ***************************
# This long event creates a chocobone when a unit moves to where bird bones are
# buried in the sand.
# There is a short conversation, but there are many possibilities for which units
# are involved, so there are a lot of ifs. There is also a lot of animation around
# the appearance of the chocobone involving a skeleton and a flightless-bird unit.
[event]
name=moveto
[filter]
x,y=32,12
side=1
[/filter]
[if]
[variable]
name=unit.race
equals=undead
[/variable]
[then]
# Bones examined by a ghost, skeleton, ghoul, or corpse.
[message]
speaker=$unit.id
message= _ "Bones. Claws and wings."
[/message]
[/then]
[else]
# Bones examined by a human.
[message]
speaker=$unit.id
message= _ "There are some large bones here. I can see claws and wings."
[/message]
[/else]
[/if]
# Choose a human for Ras-Tabahn to talk to.
[store_unit]
[filter]
race=human
x=1-99
[not]
id=Ras-Tabahn
[/not]
[/filter]
variable=all_other_humans
[/store_unit]
[if]
[variable]
name=all_other_humans.length
greater_than=0
[/variable]
[then]
[set_variable]
name=other_human
value=$all_other_humans[0].id
[/set_variable]
[/then]
[else]
[set_variable]
name=other_human
value=nobody
[/set_variable]
[/else]
[/if]
[clear_variable]
name=all_other_humans
[/clear_variable]
[if]
[have_unit]
id=$other_human
[/have_unit]
[then]
[message]
speaker=$other_human
message= _ "How odd. I wonder what are they from. A gryphon perhaps?"
[/message]
[message]
speaker=Ras-Tabahn
message= _ "A large flightless bird would be my guess."
[/message]
[message]
speaker=$other_human
message= _ "Well, there is an easy way to find out."
[/message]
[message]
speaker=Ras-Tabahn
message= _ "Indeed. Let us see."
[/message]
[/then]
[else]
[message]
speaker=Ras-Tabahn
message= _ "I wonder what are they from. A large flightless bird perhaps? Let us see."
[/message]
[/else]
[/if]
# Remove the bones and show a resurrected bird:
[remove_item]
# Remove the bones:
x,y=32,12
[/remove_item]
[animate_unit]
# Fire the recruitment animation (actually an extra_anim):
[filter]
id=Ras-Tabahn
[/filter]
flag=recruit2
[facing]
# The x is 31, not 32, because R-T might be standing on the bones
# himself, and he should face the location the bird will appear.
x,y=31,12
[/facing]
[/animate_unit]
[unit]
# Show the bird fading in. The engine will automatically find an empty
# location for it.
x,y=32,12
id=bird
type=Bone Bird
side=1
facing=se
animate=yes
[/unit]
[store_unit]
# Store the bird so we can get its location later:
[filter]
id=bird
[/filter]
variable=bird
[/store_unit]
[message]
speaker=$other_human
message= _ "Oh, you were right!"
[/message]
[message]
speaker=Ras-Tabahn
message= _ "I wonder if it could carry someone light. A skeleton maybe."
[/message]
# Replace the bird with a Chocobone:
[modify_unit]
# We're about to animate a recruit which will most likely appear to
# Ras-Tabahn's upper left, so we'll face him that direction:
[filter]
id=Ras-Tabahn
[/filter]
facing=nw
[/modify_unit]
[animate_unit]
# Fire the recruitment animation (actually an extra_anim):
[filter]
id=Ras-Tabahn
[/filter]
flag=recruit2
[/animate_unit]
[unit]
# Animate a skeleton getting recruited:
side=1
animate=yes
type=Skeleton
id=rider
placement=leader
[/unit]
[store_unit]
# Remove the skeleton, but store it so we can get its location:
[filter]
id=rider
[/filter]
variable=rider
kill=yes
[/store_unit]
[move_unit_fake]
# Show a skeleton moving from where the skeleton appeared to wherever
# the bird is:
type=Skeleton
side=1
x=$rider.x, $bird.x
y=$rider.y, $bird.y
[/move_unit_fake]
[kill]
id=bird
animate=no
[/kill]
[unit]
# Now we show a joined skeleton and bird:
x,y=$bird.x, $bird.y
type=Chocobone
side=1
animate=no
facing=se
[/unit]
[message]
speaker=Ras-Tabahn
message= _ "Splendid! These birds could be quite useful."
[/message]
[allow_recruit]
side=1
type=Chocobone
[/allow_recruit]
[message]
speaker=narrator
image=units/undead-skeletal/chocobone.png~SCALE(93,93)
message= _ "You can now recruit chocobones!"
[/message]
[set_variable]
# This variable causes the bird bones *not* to appear on Mountain_Pass.
# It won't be cleared until then.
name=bird_bones_found
value=yes
[/set_variable]
[clear_variable]
name=bird, rider, other_human
[/clear_variable]
[/event]
# *************************** ENDING / OPENING ***************************
[event]
name=enemies defeated
# We want to be able to add Ras-Tabahn's gold to the total when the two
# characters are reunited, but only Ardonna's gold will be carried over
# from the scenario right before that. We are storing R-T's gold now,
# but we want to store what it would be after the bonus. We need to
# calculate the bonus and store it before ending the scenario.
[store_turns]
variable=turns
[/store_turns]
[store_villages]
variable=villages
[/store_villages]
[store_gold]
side=1
variable=gold
[/store_gold]
# This is the formula used by the game:
[set_variable]
name=rastabahn_gold
value="$((($turns - $turn_number) * ($villages.length + 2) + ($gold)) * 0.4)"
[/set_variable]
[set_variable]
name=rastabahn_gold
round=0
[/set_variable]
[set_variable]
name=gold_message
value= _ "Hopefully this will be enough gold."
[/set_variable]
[if]
[variable]
name=rastabahn_gold
less_than=46
[/variable]
[then]
[set_variable]
name=gold_message
value= _ "We have won, but I am afraid this may not be enough gold."
[/set_variable]
[/then]
[/if]
[if]
[variable]
name=rastabahn_gold
greater_than=55
[/variable]
[then]
[set_variable]
name=gold_message
value= _ "Good. We ended with a fair amount of gold."
[/set_variable]
[/then]
[/if]
# During the next message about gold, the carryover report will not have been
# shown yet, so the player won't know how much gold R-T is talking about. To
# fix that, we temporarily set the amount of gold shown at the top of the
# screen to be equal to the carryover amount. Then we have to set it back to
# make the carryover report correct.
[gold]
side=1
amount="$(-1 * $gold + $rastabahn_gold)"
[/gold]
[message]
speaker=Ras-Tabahn
message=$gold_message
[/message]
[gold]
side=1
amount="$(-1 * $rastabahn_gold + $gold)"
[/gold]
# R-T gold should not be negative:
[if]
[variable]
name=rastabahn_gold
less_than=0
[/variable]
[then]
[set_variable]
name=rastabahn_gold
value=0
[/set_variable]
[/then]
[/if]
# We don't need "bonus=yes" etc., but it will cause the carryover report
# to be generated correctly:
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[clear_variable]
name=turns, villages, gold, gold_message
[/clear_variable]
[/event]
[event]
name=start
[message]
speaker=Okean
message= _ "You! You have destroyed the town of Carcyn!"
[/message]
[message]
speaker=Ras-Tabahn
message= _ "The town is hardly destroyed. I just encouraged a change of leadership."
[/message]
[message]
speaker=Okean
message= _ "Your words mock us. Those humans were valuable trading partners of ours. We will have justice!"
[/message]
[message]
speaker=Ras-Tabahn
message= _ "Actually, I expect you will follow them into the ground if you try to harm us."
[/message]
[if]
{BOTH_KIDS_LIVE}
[then]
[message]
speaker=Ras-Tabahn
message= _ "addressed_plural^This is going to cost us, but I want to keep some gold around for emergencies — I think 50 is about right. You help me collect some. (<i>Cough, cough</i>)"
[/message]
[message]
speaker=Carcyn
message= _ "Right away sir."
[/message]
[message]
speaker=Shynal
message= _ "Are you feeling well?"
[/message]
[message]
speaker=Ras-Tabahn
message= _ "Yes, yes. I’m quite all right."
[/message]
[message]
speaker=Shynal
message= _ "I don’t fancy wading in the water to fight these things."
[/message]
[message]
speaker=Ras-Tabahn
message= _ "No problem. We can lure them onto land."
[/message]
[message]
speaker=Shynal
message= _ "How?"
[/message]
[message]
speaker=Ras-Tabahn
message= _ "addressed_plural^Have you never been fishing before? With bait of course."
[/message]
[/then]
[/if]
[if]
{ONE_KID_LIVES}
[then]
[message]
speaker=Ras-Tabahn
message= _ "This is going to cost us, but I want to keep some gold around for emergencies — I think 50 is about right. Help me collect some. (<i>Cough, cough</i>)"
[/message]
[message]
id=Carcyn,Shynal
message= _ "Right away sir. Are you feeling well?"
[/message]
[message]
speaker=Ras-Tabahn
message= _ "Yes, yes. I’m quite all right."
[/message]
[message]
id=Carcyn,Shynal
message= _ "I don’t fancy wading in the water to fight these things."
female_message= _ "self_female^I don’t fancy wading in the water to fight these things."
[/message]
[message]
speaker=Ras-Tabahn
message= _ "No problem. We can lure them onto land."
[/message]
[message]
id=Carcyn,Shynal
message= _ "How?"
[/message]
[message]
speaker=Ras-Tabahn
message= _ "Have you never been fishing before? With bait of course."
[/message]
[/then]
[/if]
[if]
{NO_KIDS_LIVE}
[then]
[message]
speaker=Ras-Tabahn
message= _ "This is going to cost me, but I want to keep some gold around for emergencies — I think 50 is about right. I’d better send someone to collect some. (<i>Cough, cough</i>) I hope I can lure these fish onto land. Maybe I should recruit some bait."
[/message]
[/then]
[/if]
[/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}
{KIDS_ADVANCE}
[/scenario]