-
-
Notifications
You must be signed in to change notification settings - Fork 994
/
05_Invaders.cfg
411 lines (381 loc) · 14.1 KB
/
05_Invaders.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
#textdomain wesnoth-thot
[scenario]
name=_"Invaders"
id=05_Invaders
next_scenario=06_High_Pass
victory_when_enemies_defeated=yes
map_data="{campaigns/The_Hammer_of_Thursagan/maps/05_Invaders.map}"
{DEFAULT_SCHEDULE}
turns=40 # BALANCE
# This scenario is the Attack of the Fuzzy-Wuzzies. The player
# will be seriously outnumbered, but careful defensive
# maneuvering and use of veterans can save the day.
{INTRO_AND_SCENARIO_MUSIC "revelation.ogg" "the_dangerous_symphony.ogg"}
{EXTRA_SCENARIO_MUSIC "the_city_falls.ogg"}
{EXTRA_SCENARIO_MUSIC "vengeful.ogg"}
[label]
x,y=22,21
text=_"Ruined Castle"
[/label]
[story]
[part]
{THOT_BIGMAP}
story= _ "The Alliance’s road ended at the troll bridge. East of it lay only the wildlands."
[/part]
[/story]
{THOT_TRACK {JOURNEY_STAGE5}}
[side]
type="Dwarvish Fighter"
id="Aiglondur"
name=_"Aiglondur"
canrecruit=yes
side="1"
controller="human"
team_name="northern_alliance"
user_team_name=_"Alliance"
fog="no"
shroud="no"
recruit="Dwarvish Fighter,Dwarvish Thunderer,Dwarvish Guardsman, Dwarvish Scout"
{GOLD 200 175 150} # BALANCE
{FLAG_VARIANT knalgan}
[/side]
[side]
type=Orcish Warlord
id=Tan-Malgar
name= _ "Tan-Malgar"
profile=portraits/orcs/transparent/grunt-2.png
side=2
canrecruit=yes
recruit=Orcish Archer, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Spearman
{GOLD 220 260 300} # BALANCE
team_name=orcs
user_team_name=_"Orcs"
[ai]
{NO_SCOUTS}
recruitment_ignore_bad_movement=yes
recruitment_pattern=scout,fighter,fighter,archer
{ATTACK_DEPTH 4 5 5}
[/ai]
[ai]
time_of_day=dusk,first_watch,second_watch
aggression=0.75
caution=0.0
grouping=no
[/ai]
[/side]
[side]
type=Orcish Warlord
id=Tan-Grolak
name= _ "Tan-Grolak"
profile=portraits/orcs/transparent/grunt-3.png
side=3
canrecruit=yes
#ifdef EASY
recruit=Orcish Archer, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Spearman
#endif
#ifdef NORMAL
recruit=Orcish Archer, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Pillager, Goblin Spearman
#endif
#ifdef HARD
recruit=Orcish Archer, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Goblin Spearman, Goblin Impaler
#endif
{GOLD 180 220 260} # BALANCE
team_name=orcs
user_team_name=_"Orcs"
[ai]
{NO_SCOUTS}
recruitment_ignore_bad_movement=yes
#ifdef EASY
recruitment_pattern=scout,fighter,fighter,archer
#endif
#ifdef NORMAL
recruitment_pattern=scout,fighter,fighter,archer
#endif
#ifdef HARD
recruitment_pattern=scout,fighter,fighter,mixed fighter,archer
#endif
{ATTACK_DEPTH 4 5 5}
[/ai]
[ai]
time_of_day=dusk,first_watch,second_watch
aggression=0.75
caution=0.0
grouping=no
[/ai]
{INCOME 4 8 12}
[/side]
[side]
type=Orcish Warlord
id="Tan-Uthkar"
name= _ "Tan-Uthkar"
profile=portraits/orcs/transparent/warlord.png
side=4
canrecruit=yes
recruit=Orcish Archer, Orcish Grunt, Wolf Rider, Orcish Warrior, Goblin Spearman
{GOLD 180 220 260} # BALANCE
team_name=orcs
user_team_name=_"Orcs"
[ai]
{NO_SCOUTS}
recruitment_ignore_bad_movement=yes
recruitment_pattern=scout,fighter,fighter,archer
{ATTACK_DEPTH 4 5 5}
[/ai]
[ai]
time_of_day=dusk,first_watch,second_watch
aggression=0.75
caution=0.0
grouping=no
[/ai]
[/side]
{campaigns/The_Hammer_of_Thursagan/utils/herodeaths.cfg}
[side]
# The bandit indigenes
side=5
no_leader=yes
[ai]
grouping=offensive
village_value=4
[/ai]
{FLAG_VARIANT ragged}
[/side]
# Here is the code for popping up random bandits on village
# captures.
#
# Note: If the AI moves an unit onto a village spawning
# villagers this unit will not attack even it is level 2
# (vs. level 1), has 60% defense and will be healed the next
# turn. Instead the AI will use other units to attack the spawned
# units. This was reported as bug #12839 on the Wesnoth tracker
#
# Unfortunately, it appears this can't be fixed in a safe way.
# The AI is not designed to deal with quite this dynamic an environment
[event]
name=capture
first_time_only=no
[if]
[variable]
name=unit.side
numerical_equals=5
[/variable]
[then]
{CLEAR_VARIABLE cleared_$x1|_$y1|_village}
[/then]
[else]
[if]
[variable]
name=cleared_$x1|_$y1|_village
not_equals=yes
[/variable]
[then]
[set_variable]
name=cleared_$x1|_$y1|_village
value=yes
[/set_variable]
# Compute the number of indigs that will pop up
[if]
[variable]
name=unit.side
numerical_equals=1
[/variable]
[then]
# The bandit villagers hate dwarves...
[set_variable]
name=indigs
rand=0..2
[/set_variable]
[/then]
[else]
# ...but they hate orcs much worse.
[set_variable]
name=indigs
rand=2..5
[/set_variable]
[/else]
[/if]
# Now place the indigs
[set_variable]
name=indig_countdown
value=$indigs
[/set_variable]
[while]
[variable]
name=indig_countdown
greater_than=0
[/variable]
[do]
[store_locations]
[filter_adjacent_location]
x,y=$x1,$y1
[/filter_adjacent_location]
[not]
[filter]
[/filter]
[/not]
variable=possible_indig_locations
[/store_locations]
[if]
[variable]
name=possible_indig_locations.length
greater_than=0
[/variable]
[then]
{VARIABLE_OP random_location_index rand "1..$possible_indig_locations.length"}
[set_variable]
name=random_location_index
sub=1
[/set_variable]
{RANDOM (Footpad,Thief,Thug)}
[unit]
type=$random
side=5
x,y=$possible_indig_locations[$random_location_index].x,$possible_indig_locations[$random_location_index].y
generate_name=yes
random_traits=yes
[/unit]
[/then]
[/if]
[set_variable]
name=indig_countdown
sub=1
[/set_variable]
[/do]
[/while]
{CLEAR_VARIABLE indigs_countdown}
# Perform appropriate notifications
[if]
[variable]
name=indigs
greater_than=0
[/variable]
[then]
[message]
speaker=unit
message= _ "The villagers are attacking us!"
[/message]
[if]
[variable]
name=indigs_sighted
equals=0
[/variable]
[then]
[message]
speaker=Aiglondur
message= _ "Aye, it’s still bandit country, right enough."
[/message]
[/then]
[/if]
[set_variable]
name=indigs_sighted
add=1
[/set_variable]
[/then]
[else]
[if]
[variable]
name=indigs_sighted
greater_than=0
[/variable]
[then]
[message]
speaker=unit
message= _ "No bandits in this village."
[/message]
[allow_undo]
[/allow_undo]
[/then]
[/if]
[/else]
[/if]
{CLEAR_VARIABLE possible_indig_locations}
{CLEAR_VARIABLE indigs}
[/then]
[else]
[allow_undo]
[/allow_undo]
[/else]
[/if]
[/else]
[/if]
[/event]
[event]
name="prestart"
[role]
type=Dwarvish Steelclad,Dwarvish Thunderguard,Dwarvish Fighter,Dwarvish Thunderer
[not]
id=Aiglondur
[/not]
role=Scout
[/role]
[recall]
id="Angarthing"
[/recall]
[recall]
role=Scout
[/recall]
[set_variable]
name=indigs_sighted
value=0
[/set_variable]
[objectives]
side="1"
[objective]
description=_"Defeat all enemies"
condition="win"
[/objective]
[objective]
description=_"Death of Aiglondur"
condition="lose"
[/objective]
[objective]
description=_"Death of Angarthing"
condition="lose"
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=yes
carryover_percentage=40
[/gold_carryover]
[/objectives]
[/event]
[event]
name="start"
[message]
speaker="Aiglondur"
message=_"Stay alert, everyone, and keep together. This is bandit country — more than likely where Gothras and his gang came from."
[/message]
[message]
role="Scout"
#po: "muckle" = Scottish/archaic English meaning "great" or "large"
message=_"Nae sign o’ bandits I can see, captain — but there are three muckle hosts of orcs off to our east."
[/message]
[message]
speaker="Aiglondur"
message=_"What’s this? Large orcish war-bands so close to the Alliance’s border? That can only mean trouble."
[/message]
[message]
speaker="Tan-Malgar"
message=_"Well, boys, we were planning to invade the Northern Alliance anyway... These dwarves should make a tasty appetizer."
[/message]
[message]
speaker="Tan-Grolak"
message=_"Yeah, boss. Anything to get away from those masked ones..."
[/message]
[message]
speaker="Tan-Malgar"
message=_"Be silent. We are orc warriors; we do not flee foes."
[/message]
[message]
speaker="Tan-Uthkar"
message=_"But, given a choice, we fight the weaker foe first."
[/message]
[/event]
[event]
name=enemies defeated
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/event]
[/scenario]