-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
08_A_Small_Favor2.cfg
364 lines (311 loc) · 8.84 KB
/
08_A_Small_Favor2.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
#textdomain wesnoth-did
[scenario]
id=08_A_Small_Favor2
name= _ "A Small Favor — Part 2"
map_data="{campaigns/Descent_Into_Darkness/maps/08_A_Small_Favor2.map}"
{TURNS 30 27 25}
next_scenario=09_A_Small_Favor3
victory_when_enemies_defeated=no
{UNDERGROUND}
{SCENARIO_MUSIC loyalists.ogg}
{EXTRA_SCENARIO_MUSIC the_king_is_dead.ogg}
{EXTRA_SCENARIO_MUSIC siege_of_laurelmor.ogg}
# No story; this occurs immediately after the previous scenario
# wmllint: validate-off
[side]
side=1
controller=human
gold=0
team_name=intruders
user_team_name= _ "Intruders"
{FLAG_VARIANT undead}
income=-2
# wmllint: recognize Malin Keshar
{CHARACTER_STATS_MALIN_KESHAR}
shroud=yes
facing=nw
[/side]
# wmllint: validate-on
# Mages
[side]
side=2
controller=ai
team_name=defenders
user_team_name= _ "Defenders"
no_leader=yes
hidden=yes
# A guard
{NAMED_NOTRAIT_UNIT 2 (Halberdier) 10 4 () ( _ "Guard")} {GUARDIAN}
[ai]
village_value=0
aggression=0.8
[/ai]
[/side]
# This macro places the doors and adds the door-opening event
{MANOR_DOORS 1}
#TODO: Create some scenery (fire, torches, ...)
[event]
name=prestart
[objectives]
side=1
[objective]
condition=win
description= _ "Find the mage Lord Karres"
[/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=no
carryover_percentage=100
[/gold_carryover]
[/objectives]
# Randomize Karres’s location
{RANDOM 0..3}
[switch]
variable=random
[case]
value=0
{VARIABLE karres_x 10}
{VARIABLE karres_y 18}
[/case]
[case]
value=1
{VARIABLE karres_x 3}
{VARIABLE karres_y 11}
[/case]
[case]
value=2
{VARIABLE karres_x 14}
{VARIABLE karres_y 3}
[/case]
[case]
value=3
{VARIABLE karres_x 28}
{VARIABLE karres_y 3}
[/case]
[/switch]
[unit]
#ifdef EASY
type=Arch Mage
#else
type=Great Mage
#endif
id=Lord Karres
name= _ "Lord Karres"
side=2
x,y=$karres_x,$karres_y
canrecruit=yes
random_traits=no
[/unit]
{CLEAR_VARIABLE karres_x,karres_y}
[set_variables]
name=guardtypetable
[value]
type=Heavy Infantryman
[/value]
[value]
type=Heavy Infantryman
[/value]
[value]
type=Spearman
[/value]
[value]
type=Spearman
[/value]
[value]
type=Fencer
[/value]
[value]
type=Pikeman
[/value]
[value]
type=Swordsman
[/value]
[/set_variables]
[random_placement]
num_items=8
variable=loc
min_distance=4
[filter_location]
terrain=Iwr
[not]
x,y=20,20
radius=6
[/not]
[not]
x=1-5
y=1-5
[/not]
[not]
[filter][/filter]
[/not]
[/filter_location]
[command]
{NAMED_NOTRAIT_UNIT 2 "$guardtypetable[$($loc.n % $guardtypetable.length)].type" $loc.x $loc.y () (_ "Guard")} {GUARDIAN}
[/command]
[/random_placement]
{CLEAR_VARIABLE guardtypetable}
[set_variables]
name=magetypetable
[value]
type=Mage
[/value]
[value]
type=Mage
[/value]
[value]
type=Mage
[/value]
[value]
type=White Mage
[/value]
[value]
type=Red Mage
[/value]
[value]
type=Red Mage
[/value]
#ifndef EASY
[value]
type=Silver Mage
[/value]
#endif
[/set_variables]
[random_placement]
num_items={ON_DIFFICULTY 12 14 16}
variable=loc
min_distance=2
[filter_location]
terrain=Iwr
[not]
x,y=20,20
radius=6
[/not]
[not]
x=1-5
y=1-5
[/not]
[not]
[filter_adjacent_location]
terrain=!,Iwr
[/filter_adjacent_location]
[/not]
[/filter_location]
[command]
{GENERIC_UNIT 2 "$magetypetable[$($loc.n % $magetypetable.length)].type" $loc.x $loc.y}
[/command]
[/random_placement]
{CLEAR_VARIABLE magetypetable}
[recall]
id=Darken Volk
x,y=20,17
[/recall]
# We want Volk facing another direction
{MODIFY_UNIT (id=Darken Volk) facing ne}
[/event]
[event]
name=start
[store_unit]
[filter]
[filter_wml]
[variables]
got_inside_manor=yes
[/variables]
[/filter_wml]
[/filter]
kill=yes
variable=units_inside_manor
[/store_unit]
[foreach]
array=units_inside_manor
[do]
[unstore_unit]
variable=this_item
find_vacant=no
[/unstore_unit]
[modify_unit]
[filter]
id=$this_item.id
[/filter]
[object]
duration=scenario
[effect]
apply_to=loyal
[/effect]
[/object]
[/modify_unit]
[recall]
id=$this_item.id
[/recall]
[/do]
[/foreach]
{CLEAR_VARIABLE units_inside_manor}
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "Malin and Darken Volk enter the mage lord’s manor, quickly closing the heavy gates behind them."
[/message]
[message]
speaker=Malin Keshar
message= _ "That gate won’t hold back the soldiers for more than a few hours. We’d better hurry."
[/message]
[/event]
[event]
name=die
[filter]
id=Lord Karres
[/filter]
{QUAKE rumble.ogg}
[terrain]
x,y=5,4
terrain=Iwr
[/terrain]
[message]
speaker=Darken Volk
message= _ "I feel the breaking of an illusion spell. The book must be in the great hall, in the northwest corner of the manor. Let us move quickly now!"
[/message]
[objectives]
side=1
[objective]
condition=win
description= _ "Move Malin Keshar or Darken Volk through the passageway in the northwest leading to the great hall"
[/objective]
[objective]
condition=lose
description= _ "Death of Malin Keshar"
[/objective]
[objective]
condition=lose
description= _ "Death of Darken Volk"
[/objective]
{TURNS_RUN_OUT}
[/objectives]
[/event]
[event]
name=moveto
[filter]
x,y=1,1
id=Malin Keshar,Darken Volk
[/filter]
[message]
speaker=unit
message=_ "I think I found the passage to the great hall. Follow me quickly!"
[/message]
[endlevel]
result=victory
bonus=no
{NEW_GOLD_CARRYOVER 100}
carryover_report=no
[/endlevel]
[/event]
{HERODEATH_MALIN}
{HERODEATH_VOLK_B}
{TIME_OVER_DEFEAT_MANOR}
[/scenario]