-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
07_Crossroads.cfg
539 lines (476 loc) · 14.3 KB
/
07_Crossroads.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
#textdomain wesnoth-httt
[scenario]
id=07_Crossroads
name= _ "Crossroads"
map_data="{campaigns/Heir_To_The_Throne/maps/07_Crossroads.map}"
{TURNS 37 34 31}
next_scenario=08_The_Princess_of_Wesnoth
{SCENARIO_MUSIC "knolls.ogg"}
{EXTRA_SCENARIO_MUSIC "wanderer.ogg"}
{EXTRA_SCENARIO_MUSIC "journeys_end.ogg"}
{EXTRA_SCENARIO_MUSIC "breaking_the_chains.ogg"}
#wmllint: local spelling Kojun Herolm NE SE
[event]
name=prestart
[objectives]
side=1
[objective]
description= _ "Defeat Kojun Herolm"
condition=win
[/objective]
[objective]
description= _ "Death of Konrad"
condition=lose
[/objective]
[objective]
description= _ "Death of Delfador"
condition=lose
[/objective]
[objective]
description= _ "Death of Kalenz"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
[/event]
[story]
[part]
story= _ "Konrad, Delfador, and Kalenz swiftly rode east through the wilderlands of Wesnoth."
{HTTT_BIGMAP}
show_title=no
[/part]
[part]
story= _ "The queen’s agents were still scouring the coastal regions, for news of Elensefar’s rescue had not yet reached her."
{HTTT_BIGMAP}
show_title=no
[/part]
[part]
story= _ "Small as it was, Konrad’s army avoided the notice of hostile eyes in the sparsely populated western countryside for a time. However, their luck did not hold."
{HTTT_BIGMAP}
show_title=no
[/part]
[/story]
{HTTT_TRACK {JOURNEY_07_NEW} }
{DEFAULT_SCHEDULE}
[side]
type=Commander
id=Konrad
name= _ "Konrad"
unrenamable=yes
profile=portraits/konrad-human.png
side=1
canrecruit=yes
controller=human
team_name=rebels
user_team_name=_"Rebels"
{GOLD 300 200 200}
#ifdef EASY
{INCOME 10 0 0}
#endif
[ai]
passive_leader="yes"
grouping="offensive"
aggression="0.0"
caution="-0.75"
[goal]
name=protect_location
[criteria]
x,y=20,28
[/criteria]
protect_radius=12
value=20.0
[/goal]
[goal]
name=protect_location
[criteria]
x,y=16,17
[/criteria]
protect_radius=12
value=10.0
[/goal]
[goal]
name=protect_location
[criteria]
x,y=25,10
[/criteria]
protect_radius=10
value=10.0
[/goal]
[goal]
name=target
[criteria]
id=Delfador
[/criteria]
value=3.0
[/goal]
[goal]
name=protect_unit
[criteria]
id=Delfador
[/criteria]
protect_radius=6
value=20.0
[/goal]
[goal]
name=protect_unit
[criteria]
id=Konrad
[/criteria]
protect_radius=10
value=20.0
[/goal]
[goal]
name=target
[criteria]
id=Kalenz
[/criteria]
value=3.0
[/goal]
[goal]
name=protect_unit
[criteria]
id=Kalenz
[/criteria]
protect_radius=4
value=20.0
[/goal]
[avoid]
x="9-23"
y="1-9"
[/avoid]
[avoid]
x="14-19"
y="10-14"
[/avoid]
[avoid]
x="20-40"
y="16-24"
[/avoid]
{ATTACK_DEPTH 5 5 5}
[/ai]
[village]
x,y=3,5
[/village]
{FLAG_VARIANT long}
[/side]
#define CROSSROADS_AI_PARAMS
[ai]
caution=1.0
aggression=0.3
passive_leader=yes
{ATTACK_DEPTH 1 3 5}
[/ai]
[ai]
time_of_day=dusk
turns=8-100
caution=0.25
aggression=0.6
[/ai]
[ai]
time_of_day=first_watch,second_watch
caution=0.0
aggression=1.0
grouping=no
[/ai]
#enddef
[side]
type=Orcish Warlord
id=Kojun Herolm
name= _ "Kojun Herolm"
experience=0
side=2
controller=ai
canrecruit=yes
recruit=Orcish Grunt,Wolf Rider,Orcish Archer,Troll Whelp
{GOLD 70 130 190}
team_name=orcs
user_team_name=_"Orcs"
{CROSSROADS_AI_PARAMS}
{FLAG_VARIANT6 ragged}
[/side]
{STARTING_VILLAGES 2 18}
[side]
type=Orcish Warrior
id=Mokho Kimer
name= _ "Mokho Kimer"
experience=0
side=3
controller=ai
canrecruit=yes
recruit=Orcish Grunt,Wolf Rider,Orcish Archer,Troll Whelp
{GOLD 40 90 150}
team_name=orcs
user_team_name=_"Orcs"
{CROSSROADS_AI_PARAMS}
[village]
x,y=39,27
[/village]
{FLAG_VARIANT6 ragged}
[/side]
{STARTING_VILLAGES 3 17}
#signs at the crossroads for decoration
{PLACE_IMAGE scenery/signpost.png 16 16}
[event]
name=start
{MODIFY_UNIT id=Konrad profile "portraits/konrad-human.png"}
[recall]
id=Delfador
[/recall]
[recall]
id=Kalenz
[/recall]
[message]
speaker=Delfador
message= _ "Here we come to the great cross-roads. We should go northeast."
[/message]
[message]
speaker=Kalenz
message= _ "Beware! These hills are not safe! The roads are important to Asheviere’s strategy, and she has hired orcs to guard them. We shall have to fight to travel through."
[/message]
[message]
speaker=Konrad
message= _ "Then fight we shall. Fortunately, now that we have liberated Elensefar, they are providing what gold they can spare to help us swell our ranks with new recruits. Let it begin!"
[/message]
[/event]
[event]
name=prestart
# Here we set up an array that holds the possible ambusher unit types.
# We do this instead of just using a random type when creating the
# ambusher so that the even distribution of different types is
# guaranteed. For now, Orcish Archer is listed twice, so they appear
# more often than the other types.
{VARIABLE random_ambusher_type_table[0].type "Orcish Grunt"}
{VARIABLE random_ambusher_type_table[1].type "Orcish Archer"}
{VARIABLE random_ambusher_type_table[2].type "Orcish Archer"}
{VARIABLE random_ambusher_type_table[3].type "Orcish Assassin"}
{VARIABLE random_ambusher_type_table[4].type "Goblin Spearman"}
{VARIABLE random_ambusher_type_i 0}
# With this macro we place a set number of ambushers (from the above list) to a
# given rectangular area. We do this in blocks so that we can guarantee that
# every major area has at least some ambushers: if we randomized the ambush
# locations across all possible locations at once, the RNG could theoretically
# clump all the ambushers into a single corner of the map.
#define ORC_AMBUSH_AREA SIDE X_SPAN Y_SPAN NUMBER
# Any hill that's completely surrounded by other hills, mountains or
# forest is eligible as an ambush location.
[random_placement]
variable=ambush_location
num_items={NUMBER}
[filter_location]
x={X_SPAN}
y={Y_SPAN}
terrain=Hh
[not]
[filter_adjacent_location]
[not]
terrain=Hh*,Mm*,*^F*
[/not]
[/filter_adjacent_location]
[/not]
[/filter_location]
[command]
[if]
[variable]
name=random_ambusher_type_i
less_than=4
[/variable]
[then]
{VARIABLE_OP random_ambusher_type_i add 1}
[/then]
[else]
{VARIABLE random_ambusher_type_i 0}
[/else]
[/if]
# And here we place an ambusher of a type specified by the
# random_ambusher_type_table and random_ambusher_type_i
# variables, thus always having the same ratio of different
# types.
[unit]
x,y=$ambush_location.x,$ambush_location.y
type=$random_ambusher_type_table[$random_ambusher_type_i].type
side={SIDE}
facing=sw
role=ambusher
random_traits=yes
[modifications]
{TRAIT_LOYAL}
[/modifications]
{IS_LOYAL}
[/unit]
[object]
silent=yes
[filter]
x,y=$ambush_location.x,$ambush_location.y
[/filter]
[effect]
apply_to=new_ability
[abilities]
[hides]
id=orc_ambush
affect_self=yes
[filter_self]
role=ambusher
[filter_location]
terrain=Hh,Mm
[/filter_location]
[/filter_self]
[/hides]
[/abilities]
[/effect]
[/object]
[/command]
[/random_placement]
#enddef
# Only the number of ambushers differs by difficulty here.
#ifdef EASY
{ORC_AMBUSH_AREA 2 5-35 1-7 5}
{ORC_AMBUSH_AREA 2 9-24 8-15 5}
{ORC_AMBUSH_AREA 3 1-17 17-24 9}
{ORC_AMBUSH_AREA 3 18-26 16-23 5}
{ORC_AMBUSH_AREA 3 26-40 16-23 5}
#endif
#ifdef NORMAL
{ORC_AMBUSH_AREA 2 5-35 1-7 6}
{ORC_AMBUSH_AREA 2 9-24 8-15 6}
{ORC_AMBUSH_AREA 3 1-17 17-24 10}
{ORC_AMBUSH_AREA 3 18-26 16-23 6}
{ORC_AMBUSH_AREA 3 26-40 16-23 6}
#endif
#ifdef HARD
{ORC_AMBUSH_AREA 2 5-35 1-7 7}
{ORC_AMBUSH_AREA 2 9-24 8-15 7}
{ORC_AMBUSH_AREA 3 1-17 17-24 11}
{ORC_AMBUSH_AREA 3 18-26 16-23 7}
{ORC_AMBUSH_AREA 3 26-40 16-23 7}
#endif
{CLEAR_VARIABLE possible_ambush_locations}
{CLEAR_VARIABLE random_ambusher_type_table}
{CLEAR_VARIABLE random_ambusher_type_i}
{CLEAR_VARIABLE ambusher}
[/event]
[event]
name=turn refresh
first_time_only=no
[if]
[variable]
name=side_number
numerical_equals=2
[/variable]
[or]
[variable]
name=side_number
numerical_equals=3
[/variable]
[/or]
[then]
{MODIFY_UNIT side,role=$side_number,ambusher moves 0}
[/then]
[/if]
[/event]
[event]
name=moveto
first_time_only=no
[filter]
side=1
[filter_adjacent]
side=2,3
role=ambusher
[/filter_adjacent]
[/filter]
{MODIFY_UNIT (
side=2,3
role=ambusher
[filter_adjacent]
x,y=$x1,$y1
[/filter_adjacent]
) role not_ambusher}
[redraw][/redraw]
[/event]
[event]
name=moveto
[filter]
side=1
x,y=12,11
[/filter]
[move_unit_fake]
type=Elvish Archer
side=1
x=12,12,11
y=14,13,13
[/move_unit_fake]
{NAMED_LOYAL_UNIT 1 (Elvish Archer) 11 13 (Niodien) ( _ "Niodien")}
[message]
speaker=Niodien
message= _ "Stay on the path! The hills here are not safe!"
[/message]
[/event]
[event]
name=moveto
[filter]
side=1
x,y=3,15
[/filter]
[move_unit_fake]
type=Elvish Fighter
side=1
x=4,5,5
y=16,16,15
[/move_unit_fake]
{NAMED_LOYAL_UNIT 1 (Elvish Fighter) 5 15 (Loflar) ( _ "Loflar")}
[message]
speaker=Loflar
message= _ "Beware the hills! There are many orcs in hiding, preparing to ambush you!"
[/message]
[/event]
[event]
name=moveto
[allow_undo]
[/allow_undo]
[filter]
side=1
x=16
y=16
[/filter]
[redraw]
[/redraw]
[message]
speaker=narrator
image="scenery/signpost.png"
#wmllint: display on
message= _ "NE — Dan’Tonk
SE — Fort Tahn"
#wmllint: display off
[/message]
[message]
speaker=Konrad
message= _ "Dan’Tonk, we are so close to Weldyn."
[/message]
[message]
speaker=Delfador
message= _ "We dare not confront Asheviere yet. We must retrieve the Sceptre of Fire and gather more allies in the north."
[/message]
[/event]
[event]
name=die
[filter]
id=Kojun Herolm
[/filter]
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/event]
[event]
name=victory
[message]
speaker=Konrad
message= _ "Victory is ours, men. Let us proceed northeast!"
[/message]
[/event]
{campaigns/Heir_To_The_Throne/utils/deaths.cfg}
[/scenario]