-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
21_Clash_at_the_Manor.cfg
519 lines (489 loc) · 15.6 KB
/
21_Clash_at_the_Manor.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
#textdomain wesnoth-dm
[scenario]
id=21_Clash_at_the_Manor
name= _ "Clash at the Manor"
next_scenario="22_Face_of_the_Enemy"
victory_when_enemies_defeated=no
{MEMOIRS_MAP 21_Clash_at_the_Manor.map}
{TURNS 40 32 30}
{DEFAULT_SCHEDULE}
{INTRO_AND_SCENARIO_MUSIC nunc_dimittis.ogg elvish-theme.ogg}
{EXTRA_SCENARIO_MUSIC the_king_is_dead.ogg}
{EXTRA_SCENARIO_MUSIC frantic.ogg}
{EXTRA_SCENARIO_MUSIC the_city_falls.ogg}
{DM_TRACK ( show_title=yes {BOOK_STAGE2} )}
[story]
[part]
# Asheviere was already having secret talks with
# the orcs about the early HttT events and Lionel’s mission
#po: "demesne" = the part of a feudal lord's lands reserved for
#po: personal use.
#po: The "Sceptre" spelling is intentional.
story=_ "Upon his return to Weldyn, Delfador discovered that the queen had left with a strong escort to visit her family’s demesne and her ailing parents. Lionel, the King’s most trusted general, had been sent at Asheviere’s request on an errand to Knalga to retrieve the Sceptre of Fire. That mission would cost Lionel his life; and neither Lionel nor Delfador knew that Lionel’s mission had been compromised from the start."
[/part]
[part]
story= _ "Although the King did reprimand Eldred for his actions, Delfador could sense that the military commanders were solidly behind Eldred and his mother. Asheviere had flattered them and beguiled them with promises of glory and plunder in a coming war."
delay=4000
[/part]
[part]
story= _ "Delfador was granted an audience with the King and expressed his concerns about the missing Book, but the King put off a decision until Asheviere returned to Weldyn, and ordered Delfador to take no further action. And for once, Delfador knew he could not obey the King’s order."
delay=4000
[/part]
[part]
story= _ "Since he could not ask even his personal guard to go against the King’s wishes, he turned to Kalenz and the elves. Traveling by night to remain unseen they reached Asheviere’s family demesne."
delay=4000
[/part]
[/story]
{DM_TRACK {BOOK_STAGE3}}
#### Delfador's code ####
#wmllint: validate-off
[side]
{OLD_DELFADOR}
side=1
save_id=Player
persistent=yes
controller=human
recruit={ELVES}
team_name=allies
user_team_name= _ "Rebels"
{GOLD 130 100 100}
{FLAG_VARIANT long}
[/side]
#wmllint: validate-on
# wmllint: recognize Kalenz
# wmllint: recognize Chantal
[event]
name=prestart
{ELVISH_NPCS_REAPPEAR}
{MODIFY_UNIT (side=1) facing ne}
[object]
silent=yes
duration=scenario
[filter]
id=Kalenz
[/filter]
[effect]
apply_to=attack
name=sword
#textdomain wesnoth-units
set_description=_"greatsword"
#textdomain wesnoth-dm
set_icon=attacks/greatsword-orcish.png
[/effect]
[/object]
[/event]
#### /Delfador's code ####
[side]
type=General
id=Rhuwin
name=_ "Rhuwin"
facing=sw
side=2
canrecruit=yes
controller=ai
team_name=enemies
user_team_name= _ "Loyalists"
recruit=Heavy Infantryman,Spearman,Bowman,Swordsman,Pikeman,Longbowman,Shock Trooper,Royal Guard
{GOLD 130 180 230}
{INCOME 2 6 10}
[ai]
#recruitment_pattern=fighter,archer,mixed fighter,scout
aggression=1.0
caution=0.0
[goal]
name=protect_unit
[criteria]
side=2
canrecruit=yes
[/criteria]
value=3.0
[/goal]
[/ai]
{FLAG_VARIANT loyalist}
[/side]
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Royal Guard) 1}
[event]
name=prestart
[objectives]
side=1
[objective]
description= _ "Kill all enemy units"
condition=win
[/objective]
[objective]
description= _ "Enemy unit reaches a signpost"
condition=lose
[/objective]
[objective]
description= _ "Death of Delfador"
condition=lose
[/objective]
[objective]
description= _ "Death of Kalenz"
condition=lose
[/objective]
[objective]
description= _ "Death of Chantal"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=yes
carryover_percentage=80
[/gold_carryover]
[note]
description= _ "Enemy rider units will go for a signpost"
[show_if]
[have_unit]
id=Rhuwin
side=2
[/have_unit]
[/show_if]
[/note]
[note]
description= _ "All enemy units will go for a signpost"
[show_if]
[not]
[have_unit]
id=Rhuwin
side=2
[/have_unit]
[/not]
[/show_if]
[/note]
[/objectives]
[/event]
[event]
name=start
[message]
id=Delfador
message= _ "I am grieved to have to resort to this. Yet the book must be recovered at all costs and no one should be left alive."
[/message]
[message]
id=Kalenz
message= _ "The book’s curse is already weighing heavy upon you, friend. But we cannot falter. We have acquired orcish weapons, as you have requested. Nobody will be able to link this to you or the elves."
[/message]
[message]
id=Kalenz
message= _ "Make sure everybody hears the orders. Nobody must escape."
[/message]
[message]
id=Rhuwin
message= _ "Elves! And that traitor, Delfador is with them! Riders, quickly, go alert the queen. And guards, prepare to strike them down!"
[/message]
{HIGHLIGHT_IMAGE 1 19 scenery/signpost.png ()}
{HIGHLIGHT_IMAGE 18 33 scenery/signpost.png ()}
[/event]
[event]
name=recruit,recall
first_time_only=no
[filter]
race=elf
[not]
type_adv_tree=Elvish Shaman
[/not]
[/filter]
[object]
silent=yes
duration=scenario
[effect]
[filter]
[not]
type=Elvish Hero, Elvish Champion, Elvish Marshal
[/not]
[/filter]
apply_to=attack
name=sword
set_icon=attacks/sword-orcish.png
[/effect]
[effect]
[filter]
type=Elvish Hero, Elvish Champion, Elvish Marshal
[/filter]
apply_to=attack
name=sword
#textdomain wesnoth-units
set_description=_"greatsword"
#textdomain wesnoth-dm
set_icon=attacks/greatsword-orcish.png
[/effect]
[effect]
[filter]
[not]
type_adv_tree=Elvish Marksman
[/not]
[/filter]
apply_to=attack
name=bow
set_icon=attacks/bow-orcish.png
[/effect]
[effect]
[filter]
type_adv_tree=Elvish Marksman
[/filter]
apply_to=attack
name=longbow
#textdomain wesnoth-units
set_description=_"bow"
#textdomain wesnoth-dm
set_icon=attacks/bow-orcish.png
[/effect]
[/object]
[/event]
[event]
name=side 2 turn 1 refresh
# place riders and set them to head for the signposts
# deduct unit cost from side gold so they look like they were recruited
[unit]
type={ON_DIFFICULTY Cavalryman Dragoon Dragoon}
id=rider1
side=2
x,y=27,19
goto_x,goto_y=1,19
moves=0
animate=yes
[/unit]
[unit]
type={ON_DIFFICULTY Cavalryman Cavalryman Dragoon}
id=rider2
side=2
x,y=29,21
goto_x,goto_y=18,33
moves=0
animate=yes
[/unit]
[store_unit]
[filter]
id=rider1
[/filter]
variable=rider1
[/store_unit]
[store_unit]
[filter]
id=rider2
[/filter]
variable=rider2
[/store_unit]
[store_side]
side=2
[/store_side]
[modify_side]
side=2
gold="$($side.gold - $rider1.cost - $rider2.cost)"
[/modify_side]
{CLEAR_VARIABLE rider1,rider2,side}
[/event]
# now that the enemy has made the initial recruitment, allow additional riders
# to be recruited when enough gold is accumulated
[event]
name=side 2 turn 2
[allow_recruit]
type=Cavalryman,Dragoon
side=2
[/allow_recruit]
[/event]
[event]
name=recruit
first_time_only=no
[filter]
type=Cavalryman,Dragoon
[/filter]
[set_variable]
name=sentry
rand=1..2
[/set_variable]
[if]
[variable]
name=sentry
equals=1
[/variable]
[then]
{MODIFY_UNIT (x,y=$x1,$y1) (goto_x) (1) }
{MODIFY_UNIT (x,y=$x1,$y1) (goto_y) (19) }
[/then]
[/if]
[if]
[variable]
name=sentry
equals=2
[/variable]
[then]
{MODIFY_UNIT (x,y=$x1,$y1) (goto_x) (18) }
{MODIFY_UNIT (x,y=$x1,$y1) (goto_y) (33) }
[/then]
[/if]
[/event]
# new objectives, find the book
[event]
name=new-objectives
[message]
id=Delfador
message= _ "The guards are slain. Now we must look for the book."
[/message]
[objectives]
side=1
[objective]
description= _ "Find the secret door to enter the manor"
condition=win
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=yes
carryover_percentage=80
[/gold_carryover]
[/objectives]
# Create some new events for when we move to the right spot.
[event]
name=moveto
[filter]
side=1
x,y=32,8
[/filter]
[music]
name=northerners.ogg
play_once=yes
[/music]
[message]
id=$unit.id
message= _ "This looks like a secret door. Let’s see where it leads..."
[/message]
[terrain]
x=32
y=9
terrain=Uu
[/terrain]
[endlevel]
result=victory
[/endlevel]
[/event]
[/event]
[event]
name=last breath
[filter]
id=Rhuwin
[/filter]
[if]
[have_unit]
side=2
[not]
id=Rhuwin
[/not]
[/have_unit]
[then]
[message]
speaker=Rhuwin
message= _ "Everyone, quickly, go alert the queen!"
[/message]
# loop through all remaining units and have them go to the nearest exit
[store_unit]
[filter]
side=2
[/filter]
variable=escapees
[/store_unit]
[foreach]
array=escapees
[do]
[find_path]
[traveler]
id=$this_item.id
[/traveler]
[destination]
x,y=1,19
[/destination]
variable=exit1
allow_multiple_turns=yes
check_zoc=no
[/find_path]
[find_path]
[traveler]
id=$this_item.id
[/traveler]
[destination]
x,y=18,33
[/destination]
variable=exit2
allow_multiple_turns=yes
check_zoc=no
[/find_path]
[if]
{VARIABLE_CONDITIONAL exit1.hexes less_than $exit2.hexes}
[then]
{MODIFY_UNIT (id=$this_item.id) (goto_x) (1) }
{MODIFY_UNIT (id=$this_item.id) (goto_y) (19) }
[/then]
[else]
{MODIFY_UNIT (id=$this_item.id) (goto_x) (18) }
{MODIFY_UNIT (id=$this_item.id) (goto_y) (33) }
[/else]
[/if]
{CLEAR_VARIABLE exit1,exit2}
[/do]
[/foreach]
{CLEAR_VARIABLE escapees}
[/then]
[/if]
[/event]
[event]
name=die
[filter]
id=Rhuwin
[/filter]
[filter_condition]
[have_unit]
side=2
[/have_unit]
[/filter_condition]
[show_objectives]
[/show_objectives]
[/event]
[event]
name=die
first_time_only=no
[if]
[not]
[have_unit]
side=2
[/have_unit]
[/not]
[then]
[fire_event]
# Factored like this so the inner events
# won't trigger a false positive from wmllint.
name=new-objectives
[/fire_event]
[/then]
[/if]
[/event]
[event]
name=moveto
[filter]
side=2
x,y=1,19
[/filter]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=moveto
[filter]
side=2
x,y=18,33
[/filter]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=time over
[message]
id=Delfador
message= _ "Reinforcements on the horizon. We are too late!"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
{MEMOIRS_DEATHS}
[/scenario]