-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
04_Beginning_of_the_Revenge.cfg
439 lines (360 loc) · 11.7 KB
/
04_Beginning_of_the_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
#textdomain wesnoth-did
[scenario]
id=04_Beginning_of_the_Revenge
name= _ "Outset of Vengeance"
map_file=campaigns/Descent_Into_Darkness/maps/04_Beginning_of_the_Revenge.map
{TURNS 30 27 24}
next_scenario=05_Orc_War
victory_when_enemies_defeated=yes
{DEFAULT_SCHEDULE}
{SCENARIO_MUSIC the_city_falls.ogg}
{EXTRA_SCENARIO_MUSIC casualties_of_war.ogg}
{EXTRA_SCENARIO_MUSIC vengeful.ogg}
[story]
[part]
music=underground.ogg
story= _ "Weeks pass in the cold, bare caverns. There is little light and little food, but Malin’s burning desire for vengeance sustains him through his training. As the grip of black magic grows stronger, so does his control of the undead. He finds it to be a mastery of a different sort than what he was taught at the Academy. The magic reaches out to him as it never has before; he listens and it speaks back — he senses its will and lets it guide him — he embraces the dark magic as an extension of himself."
{STORYTXT_BACKGROUND travel.jpg}
[/part]
[part]
story= _ "When spring comes, Darken Volk leads Malin toward the jagged mountain peaks in the north. In the higher reaches, snow begins to melt into rivulets of water, streaming downward and fracturing the surface of the ice that blankets the river Listra. Though the unstable terrain is hazardous to traverse, the elder necromancer insists that they press on, saying that he hopes to catch the orcish fighters unprepared by arriving early in the year."
{STORYTXT_BACKGROUND travel.jpg}
[/part]
[/story]
{DID_TRACK {JOURNEY_04_NEW}}
# wmllint: validate-off
[side]
side=1
controller=human
recruit=Walking Corpse,Vampire Bat,Ghost,Ghoul,Skeleton Archer,Skeleton
{GOLD 170 140 110}
team_name=good
user_team_name= _ "Malin Keshar"
{FLAG_VARIANT undead}
color=darkblue
# wmllint: recognize Malin Keshar
{CHARACTER_STATS_MALIN_KESHAR}
facing=nw
[/side]
# wmllint: validate-on
{STARTING_VILLAGES 1 5}
[side]
side=2
controller=ai
recruit=Orcish Archer,Orcish Crossbowman,Wolf Rider,Orcish Grunt
{GOLD 20 40 60}
{INCOME 2 4 6}
team_name=orcs
user_team_name= _ "Orcs"
{FLAG_VARIANT6 ragged}
color=white
type=Orcish Warlord
id="Gron'r Hronk"
name= _ "Gron’r Hronk"
canrecruit=yes
facing=nw
[ai]
aggression=0.5
caution=0.1
villages_per_scout=8
village_value=0.5
recruitment_pattern=scout,archer,archer,fighter
[/ai]
[/side]
{STARTING_VILLAGES 2 5}
[side]
side=3
controller=ai
recruit=Orcish Archer,Orcish Crossbowman,Wolf Rider,Goblin Pillager,Orcish Grunt
{GOLD 40 65 90}
{INCOME 3 4 5}
team_name=orcs
user_team_name= _ "Orcs"
{FLAG_VARIANT6 ragged}
color=white
type=Orcish Warlord
id="K'rrlar Oban"
name=_ "K’rrlar Oban"
canrecruit=yes
facing=sw
[ai]
aggression=0.5
caution=0.2
villages_per_scout=6
recruitment_pattern=archer,scout,fighter
[/ai]
[/side]
{STARTING_VILLAGES 3 5}
# Signpost at the end of the pass
{PLACE_IMAGE scenery/signpost.png 17 1}
[event]
name=prestart
[objectives]
side=1
[objective]
condition=win
description= _ "Move Malin to the end of the mountain pass"
[/objective]
[objective]
{ALTERNATIVE_OBJECTIVE_CAPTION}
condition=win
description= _ "Kill the orc leaders"
[/objective]
[objective]
condition=lose
description= _ "Death of Malin Keshar"
[/objective]
[objective]
condition=lose
description= _ "Death of Darken Volk"
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
[lua]
code=<<
-- For prime-time use the filter terrain needs to come in and the convert
-- table needs to be VERY complete. Or, rename this to morph_terrain and
-- have the conversion table come in as an argument, too.
local locations = wesnoth.get_locations{terrain = 'Gd,Gd^Es,Gd^Em,Gd^Fmw,Gd^Fdw,Hh,Hh^Fdw,Hh^Fmw,Mm,Mm^Xm'}
local coverage = 0.25
-- Constant 25% random coverage.
-- Valid range is (0.0 .. 1.0)
-- Do not raise too high or player may not be able to make it in the time allotted.
local snowNeeded = (#locations * coverage)
local convert = {
['Gd'] = 'Aa',
['Gd^Es'] = 'Aa',
['Gd^Em'] = 'Aa^Vca',
['Gd^Fmw'] = 'Aa^Fma',
['Gd^Fdw'] = 'Aa^Fpa',
['Hh'] = 'Ha',
['Hh^Fdw'] = 'Ha^Fdw',
['Hh^Fmw'] = 'Ha^Fmw',
['Mm'] = 'Ms',
['Mm^Xm'] = 'Ms^Xm'
}
local loopCounter
for loopCounter = 1, snowNeeded do
local locationsIndex = wesnoth.random(#locations)
local coordinate = locations[locationsIndex]
local terrainCode = wesnoth.get_terrain(coordinate[1], coordinate[2])
wesnoth.set_terrain(coordinate[1], coordinate[2], (convert[terrainCode] or terrainCode))
table.remove(locations, locationsIndex)
end
>>
[/lua]
[recall]
id=Darken Volk
[/recall]
{MODIFY_UNIT (id=Malin Keshar) profile (portraits/malin_old.png)}
{MODIFY_UNIT (side=1) facing nw}
[/event]
[event]
name=start
[message]
speaker=Darken Volk
message= _ "Across this pass lies the eastern edge of the Heart Mountains proper. For their distinctive shape, the orcs call these the ‘Whitefang’ Mountains, which is also the namesake of the dominant clan in this region. They are the very same who killed your father."
[/message]
[message]
speaker=Malin Keshar
message= _ "The Whitefang orcs... so that is their name."
[/message]
[message]
speaker=Darken Volk
message= _ "To reach them, we must first destroy the orcs who block our way out of this mountain pass. Then, we can move on to our main target."
[/message]
[message]
speaker=Malin Keshar
message= _ "I have anticipated this day for a long time. At last, we shall have revenge."
[/message]
[/event]
# In-scenario events
[event]
name=die
first_time_only=yes
[filter]
race=orc
[/filter]
[filter_second]
side=1
[/filter_second]
[message]
speaker=Malin Keshar
message=_ "Feel my wrath, vile creature!"
[/message]
[/event]
[event]
name=die
[filter]
id="Gron'r Hronk"
[/filter]
[filter_second]
side=1
[/filter_second]
[message]
speaker=Malin Keshar
message=_ "These orcs aren’t so strong after all!"
[/message]
[/event]
[event]
name=last breath
first_time_only=yes
[filter]
id="K'rrlar Oban"
[/filter]
[filter_second]
side=1
[/filter_second]
[message]
speaker="K'rrlar Oban"
message=_ "Wait, human! I may be of use to you! What is it that you desire? Slaves? Gold? Land?"
[/message]
[message]
speaker=Malin Keshar
message=_ "What I desire is your death."
[/message]
[kill]
id="K'rrlar Oban"
animate=yes
fire_event=yes
[/kill]
[/event]
[event]
name=moveto
[filter]
side=1
[not]
type_adv_tree=Ghost,Vampire Bat
[/not]
[filter_location]
terrain=Ai
[/filter_location]
[/filter]
[message]
speaker=Malin Keshar
message= _ "The ice doesn’t look very thick..."
[/message]
[message]
speaker=Darken Volk
message= _ "..."
[/message]
[allow_undo][/allow_undo]
[/event]
[event]
name=new turn
first_time_only=no
[store_locations]
[filter]
[not]
type_adv_tree=Ghost,Vampire Bat
[/not]
[/filter]
find_in=weakened_ice
variable=breaking_ice
[/store_locations]
[foreach]
array=breaking_ice
[do]
[scroll_to]
x,y=$this_item.x,$this_item.y
[/scroll_to]
[terrain]
x,y=$this_item.x,$this_item.y
terrain=Wo
[/terrain]
[remove_item]
x,y=$this_item.x,$this_item.y
image=misc/weakened-ice.png
[/remove_item]
[redraw][/redraw]
[if]
[have_unit]
x,y=$this_item.x,$this_item.y
race=undead
[/have_unit]
[then]
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "The weak ice gives way beneath the undead creature, who becomes mired in the thick mud at the lake’s bottom."
[/message]
[/then]
[else]
[message]
speaker=narrator
image=wesnoth-icon.png
message=_ "The weak ice gives way beneath the heavy warrior, who drowns in the frigid mountain waters."
[/message]
[/else]
[/if]
[sound]
name=water-blast.wav
[/sound]
[kill]
x,y=$this_item.x,$this_item.y
animate=yes
fire_event=yes
[/kill]
[/do]
[/foreach]
[store_locations]
terrain=Ai
[filter]
[not]
type_adv_tree=Ghost,Vampire Bat
[/not]
[/filter]
[or]
terrain=Ai
find_in=weakened_ice
[/or]
variable=weakened_ice
[/store_locations]
[foreach]
array=weakened_ice
[do]
[item]
x,y=$this_item.x,$this_item.y
image=misc/weakened-ice.png
[/item]
[/do]
[/foreach]
{CLEAR_VARIABLE breaking_ice}
[/event]
# Victory Condition
[event]
name=moveto
[filter]
id=Malin Keshar
x,y=17,1
[/filter]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/event]
[event]
name=enemies defeated
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/event]
[event]
name=victory
[message]
speaker=Malin Keshar
message=_ "It’s time to hunt down the Whitefangs."
[/message]
{CLEAR_VARIABLE weakened_ice}
[/event]
{HERODEATH_MALIN}
{HERODEATH_VOLK}
{TIME_OVER_DEFEAT}
[/scenario]