-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
09_The_Mage.cfg
510 lines (472 loc) · 14.6 KB
/
09_The_Mage.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
#textdomain wesnoth-dw
# You need pierce and fire to take care of scorpions. Javelineers get
# one more level to shine. Diviners are also great. Hopefully you have
# Keshan and the storm trident because those will be very
# useful. Keshan is especially helpful in actually finding the
# mage. He can get there several turns ahead of even the fastest
# merman (after you take out most of the scorpions in the way), but of
# course you don't *need* him.
[scenario]
name= _ "The Mage"
map_file=The_Mage.map
id=09_The_Mage
next_scenario=10_The_Flaming_Sword
[story]
[part]
{DW_BIGMAP}
story= _ "The party traveled back to the mainland and followed the shore further north. Kai Krellis had much to think about. First, what Tyegëa had revealed about his ancestry gave him questions he could not answer. Second, he was nervous about the task ahead. He felt confidence in his people but feared paying too great a price in dead and wounded to pass Tyegëa’s test. He felt sometimes angry at Tyegëa for sending him on this extra journey, and sometimes grateful that she was willing to help at all."
[/part]
[part]
{DW_BIGMAP}
story= _ "After several days, the smell of the swamp was just becoming noticeable when they found a small ruined castle in the right place to be the one Tyegëa had mentioned. Night was falling, and it was very dark beneath the trees, but Krellis was in a hurry, now that the end of their journey was in sight. He decided to go ashore and try to find the mage immediately."
[/part]
[/story]
{DW_TRACK {JOURNEY_09_NEW} }
# Don't change this order without modifying the turns on which the
# bats appear and disappear.
{DEFAULT_SCHEDULE_DUSK}
{TURNS4 20 20 19 18}
victory_when_enemies_defeated=no
# wmllint: validate-off
[side]
{SIDE_1}
{GOLD4 180 160 140 120}
shroud=yes
[/side]
# wmllint: validate-on
[side]
side=2
controller=ai
user_team_name= _ "Hungry Creatures"
team_name=bad guys
no_leader=yes
shroud=yes
[ai]
village_value=0
[/ai]
[/side]
[event]
name=prestart
[music]
name=revelation.ogg
[/music]
{RECALL_LOYAL_UNITS}
[objectives]
side=1
[objective]
description= _ "Find Caladon the mage"
condition=win
[/objective]
{HOW_TO_LOSE}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
{PLACE_IMAGE scenery/temple1.png 8 5}
[unit]
type=Giant Spider
x=17
y=4
side=2
[/unit]
#ifndef EASY
[unit]
type=Giant Spider
x=2
y=4
side=2
[/unit]
#endif
#ifdef NIGHTMARE
[unit]
type=Giant Spider
x=11
y=5
side=2
[/unit]
#endif
[random_placement]
{QUANTITY4 num_items 8 10 12 14}
variable=scorp
[filter_location]
include_borders=no
[not]
# In water or a chasm
terrain=Qx*,W*
[/not]
[not]
# Too close to the player’s keep
terrain=K*
radius=8
[/not]
[not]
# Occupied by spiders.
[filter]
[/filter]
[/not]
[/filter_location]
[command]
[unit]
type=Giant Scorpion
x=$scorp.x
y=$scorp.y
side=2
[/unit]
[/command]
[/random_placement]
[/event]
[event]
name=start
[message]
speaker=Cylanna
message= _ "I do not much care for the look of this area. The darkness seems to hang beneath the trees, unnaturally dense."
[/message]
[message]
speaker=Teeloa
message= _ "I just heard a splash. I think something’s out there."
[/message]
[message]
speaker=Kai Krellis
message= _ "Let us find the mage quickly and leave."
[/message]
[/event]
[event]
name=turn 2
[music]
name=the_city_falls.ogg
append=yes
[/music]
[/event]
# *****BEGIN BATS SECTION****************BEGIN BATS SECTION*****
# Puts bats in the southern chasm. Random bats will be chosen from
# the BAT_TYPES_VALUE. Chasm hexes are found rather than hard-coded
# so they can be moved or changed on the map without affecting
# this macro. (As long as they don't go too far.) Besides, it's
# easy to do.
#define BATS_EXIT_CAVE BAT_TYPES_VALUE
#find chasm hexes, and put them in an array
[store_locations]
variable=chasm_hexes
terrain=Qx* #Chasm
[and]
x=10
y=21
radius=5
[/and]
[/store_locations]
# Put a bat into each chasm hex.
[foreach]
array=chasm_hexes
[do]
{RANDOM ({BAT_TYPES_VALUE})}
[unit]
type=$random
x=$this_item.x
y=$this_item.y
side=2
animate=yes # The animation fades in, which looks good. If the animation is ever changed to something else, this might have to be changed.
[/unit]
[/do]
[/foreach]
{CLEAR_VARIABLE chasm_hexes}
#enddef
#define BATS_ENTER_CAVE
#enddef
[event]
name=side 2 turn
first_time_only=no
[set_variable]
name=time_of_day
value=$turn_number
[/set_variable]
[set_variable]
name=time_of_day
modulo=6
[/set_variable]
# The bats go in at dawn.
[if]
[variable]
name=time_of_day
equals=4
[/variable]
[then]
# Each bat will move back to the nearest chasm hex and disappear.
[store_unit]
[filter]
race=bats
[not]
side=1
[/not]
[/filter]
variable=bats
[/store_unit]
[foreach]
array=bats
[do]
{NEAREST_HEX $this_item.x $this_item.y 99 (terrain=Qx*) chasm_hex}
[kill]
id=$this_item.id
animate=no
[/kill]
[move_unit_fake]
type=$this_item.type
x=$this_item.x, $chasm_hex.x
y=$this_item.y, $chasm_hex.y
side=2
[/move_unit_fake]
[/do]
[/foreach]
{CLEAR_VARIABLE bats}
{CLEAR_VARIABLE chasm_hex}
[/then]
[/if]
# The bats start coming out at dusk. The number of turns they keep coming out is determined by the difficulty. So is the type of bat:
#ifdef EASY
[if]
[variable]
name=time_of_day
equals=1
[/variable]
[then]
{BATS_EXIT_CAVE (Vampire Bat)}
[/then]
[/if]
#endif
#ifdef NORMAL
[if]
[variable]
name=time_of_day
equals=1
[/variable]
[or]
[variable]
name=time_of_day
equals=2
[/variable]
[/or]
[then]
{BATS_EXIT_CAVE (Vampire Bat)}
[/then]
[/if]
#endif
#ifdef HARD
[if]
[variable]
name=time_of_day
equals=1
[/variable]
[or]
[variable]
name=time_of_day
equals=2
[/variable]
[or]
[variable]
name=time_of_day
equals=3
[/variable]
[/or]
[/or]
[then]
{BATS_EXIT_CAVE (Vampire Bat)}
[/then]
[/if]
#endif
#ifdef NIGHTMARE
[if]
[variable]
name=time_of_day
equals=1
[/variable]
[or]
[variable]
name=time_of_day
equals=2
[/variable]
[or]
[variable]
name=time_of_day
equals=3
[/variable]
[/or]
[/or]
[then]
{BATS_EXIT_CAVE (Vampire Bat,Blood Bat)}
[/then]
[/if]
#endif
# Dialog the first time bats appear:
[if]
[variable]
name=turn_number
equals=1
[/variable]
[then]
[message]
speaker=Teeloa
message= _ "Hey, that cavern is full of bats! I HATE those things."
[/message]
[message]
speaker=Kai Krellis
message= _ "I hope there aren’t any more bats in there."
[/message]
#ifndef EASY
[if]
[have_unit]
id=Gwabbo
[/have_unit]
[then]
[message]
speaker=Gwabbo
message= _ "This is a good place for a large colony, so I think we will see more soon."
[/message]
[/then]
[else]
[message]
speaker=Cylanna
message= _ "This is a good place for a large colony, so I imagine we will see more soon."
[/message]
[/else]
[/if]
#endif
[/then]
[/if]
[/event]
# ***** END BATS SECTION********************END BATS SECTION*****
[event]
name=moveto
[filter]
side=1
x=8
y=5
[/filter]
[unit]
type=Silver Mage
x=8
y=5
side=1
id=Caladon
name= _ "Caladon"
unrenamable=yes
[modifications]
{TRAIT_LOYAL_HERO}
{TRAIT_QUICK}
[/modifications]
profile=portraits/caladon.png
[/unit]
[if]
[have_unit]
x,y=$x1,$y1
id=Keshan,Inky
[/have_unit]
[then]
[message]
speaker=Keshan
message= _ "There is somebody here."
[/message]
[message]
speaker=Caladon
message= _ "Whoa there! BACK off or else!"
[/message]
[message]
speaker=Kai Krellis
message= _ "Do not worry about him. He is friendly."
[/message]
[/then]
[else]
[if]
[variable]
name=unit.id
contains=Bat
[/variable]
[then]
[message]
speaker=unit
message= _ "Neep, neep, neep!"
[/message]
[/then]
[else]
[message]
speaker=unit
message= _ "Hey, I found somebody!"
[/message]
[/else]
[/if]
[/else]
[/if]
[message]
speaker=Kai Krellis
message= _ "You must be Caladon. We are glad to see you."
[/message]
[message]
speaker=Caladon
message= _ "I am Caladon. Am I glad to see YOU?"
[/message]
[message]
speaker=Kai Krellis
message= _ "I am Kai Krellis of Jotha. I am seeking a flaming sword, and I am told you know where to find it."
[/message]
[message]
speaker=Caladon
message= _ "Ha! A MERman wants the Flaming Sword of AGNOVON! Why would YOU be able to get it when so many others could NOT? Although you do have an impressive collection of allies there."
[/message]
[message]
speaker=Kai Krellis
message= _ "Whether I can succeed or not, I must try. Will you help me find it?"
[/message]
[message]
speaker=Caladon
message= _ "I will show you EXACTLY where it is, but knowing where to FIND it isn’t the hard part. Oh, no! You will see, my fine merman, you will see."
[/message]
[message]
speaker=Cylanna
message= _ "We would be very grateful if you would guide us."
[/message]
[message]
speaker=Caladon
message= _ "I would be HAPPY to guide such a pretty mermaid AND her friends. Follow me everybody!"
[/message]
[clear_variable]
name=scorp
[/clear_variable]
[clear_variable]
name=time_of_day
[/clear_variable]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/event]
[event]
name=die
[filter]
id=Cylanna
[/filter]
[message]
speaker=Kai Krellis
message= _ "Cylanna! I need you!"
[/message]
[message]
speaker=Kai Krellis
message= _ "Tyegëa will never forgive me. We are lost."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=die
[filter]
id=Kai Krellis
[/filter]
[message]
speaker=Cylanna
message= _ "We are lost without our king!"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[/scenario]