-
-
Notifications
You must be signed in to change notification settings - Fork 988
/
The_Elves_Besieged.cfg
314 lines (286 loc) · 8.46 KB
/
The_Elves_Besieged.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
#textdomain wesnoth-ai
[test]
id=The_Elves_Besieged
name= _ "The Elves Besieged"
next_scenario=micro_ai_test
victory_when_enemies_defeated=no
map_data="{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}"
turns=-1
{DEFAULT_SCHEDULE}
# Chantal can't be killed for storyline reasons.
# Prevent AIs from getting too close.
#define AVOID_CHANTAL
[avoid]
x,y=2-4,22-24
[/avoid]
#enddef
{STARTING_VILLAGES 5 10}
{STARTING_VILLAGES 6 10}
{STARTING_VILLAGES 1 3}
{STARTING_VILLAGES_AREA 6 7 10 6}
{STARTING_VILLAGES_AREA 5 17 3 1}
{STARTING_VILLAGES_AREA 6 9 40 10}
{STARTING_VILLAGES_AREA 5 26 31 5}
{STARTING_VILLAGES_AREA 5 29 46 1}
# wmllint: recognize Kalenz
[side]
type=Spearman
id=Konrad
name= _"Konrad"
unrenamable=yes
side=1
persistent=no
canrecruit=yes
controller=ai
[modifications]
{TRAIT_QUICK}
[/modifications]
recruit=Elvish Scout,Elvish Fighter,Elvish Archer,Elvish Shaman
gold=100
team_name=elves
user_team_name=_"Rebels"
[unit]
id=Delfador
name= _ "Delfador"
unrenamable=yes
type=Elder Mage
side=1
x=19
y=23
{IS_HERO}
[modifications]
{TRAIT_LOYAL}
{TRAIT_INTELLIGENT}
[/modifications]
[/unit]
{FLAG_VARIANT long}
# Also have them target Side 2 preferentially, in order to go in that direction
[ai]
[goal]
[criteria] #NOTE: this is a SUF, because we're targeting a unit
side=3
[/criteria]
value=1000
[/goal]
[/ai]
[/side]
#macro which tells the AI not to start thinking about
#whether it's a bad idea to send trolls into the forest
#against elves, and just do it
#define EBESIEGED_RECRUITMENT
[ai]
recruitment_ignore_bad_movement=yes
recruitment_ignore_bad_combat=yes
simple_targeting=yes
[/ai]
#enddef
[side]
type=Orcish Warlord
id=Urug-Telfar
name= _ "Urug-Telfar"
side=2
persistent=no
canrecruit=yes
recruit=Orcish Warrior,Goblin Knight,Goblin Pillager,Orcish Crossbowman,Orcish Assassin,Troll
gold=400
[ai]
recruitment_pattern=scout,fighter,mixed fighter,archer
{AVOID_CHANTAL}
[/ai]
{EBESIEGED_RECRUITMENT}
team_name=orcs
user_team_name=_"Orcs"
{FLAG_VARIANT6 ragged}
[/side]
[side]
type=Orcish Warlord
id=Knafa-Tan
name= _ "Knafa-Tan"
side=3
persistent=no
canrecruit=yes
recruit=Orcish Warrior,Wolf Rider,Orcish Crossbowman,Orcish Assassin,Troll
{EBESIEGED_RECRUITMENT}
team_name=orcs
user_team_name=_"Orcs"
gold=200
[ai]
{AVOID_CHANTAL}
[/ai]
{FLAG_VARIANT6 ragged}
[/side]
[side]
type=Orcish Warlord
id=Maga-Knafa
name= _ "Maga-Knafa"
side=4
persistent=no
canrecruit=yes
recruit=Orcish Warrior,Wolf Rider,Orcish Crossbowman,Troll Warrior,Orcish Slayer
{EBESIEGED_RECRUITMENT}
team_name=orcs
user_team_name=_"Orcs"
gold=200
[ai]
{AVOID_CHANTAL}
[/ai]
{FLAG_VARIANT6 ragged}
[/side]
#allies of Konrad
[side]
type=Elvish Champion
id=Galdrad
name= _ "Galdrad"
side=5
persistent=no
canrecruit=yes
recruit=Elvish Fighter,Elvish Archer,Elvish Ranger
[ai]
recruitment_pattern=fighter,archer,mixed fighter
[/ai]
gold=170
team_name=elves
user_team_name=_"Rebels"
{FLAG_VARIANT long}
[/side]
[side]
type=Elvish Shyde
id=Chantal
name= _ "Chantal"
profile=portraits/chantal-shyde.png
side=6
persistent=no
canrecruit=yes
recruit=Elvish Shaman,Elvish Archer,Elvish Fighter
[ai]
passive_leader="yes"
leader_shares_keep="yes"
recruitment_pattern=archer,archer,fighter,fighter,healer
[/ai]
gold=170
team_name=elves
user_team_name=_"Rebels"
{FLAG_VARIANT long}
[/side]
[side] # This side is only here because we need one persistent side for the game to go on
side=7
controller=null
persistent=yes
save_id=Grnk
hidden=yes
[/side]
[event]
name=start
{VARIABLE scenario_name The_Elves_Besieged}
[micro_ai]
# Required keys of [micro_ai] tag
side=1
ai_type=protect_unit
action=add
[unit]
id=Delfador
goal_x,goal_y=1,2
[/unit]
[unit]
id=Konrad
goal_x,goal_y=1,1
[/unit]
disable_move_leader_to_keep=yes
[/micro_ai]
[message]
speaker=Konrad
message= _ "Master Delfador! Look, there are orcs coming from all directions! What shall we do?"
[/message]
[message]
speaker=Delfador
message= _ "There are too many to fight, far too many. We must escape!"
[/message]
# wmllint: unbalanced-on
{MESSAGE narrator "wesnoth-icon.png" "" _"This is a reenactment of scenario The Elves Besieged of the mainline campaign Heir to the Throne, just that the AI is playing Konrad's side here. The goal is to move Konrad to the signpost in the northwest, while keeping both Konrad and Delfador alive. The same AI as in scenario Protect Unit is used.
Note: The Protect Unit AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."}
# wmllint: unbalanced-off
{PLACE_IMAGE "scenery/signpost.png" 1 1}
{SET_LABEL 1 1 _"Move Konrad here"}
[scroll_to_unit]
id=Konrad
[/scroll_to_unit]
[/event]
[event]
name=moveto
[filter]
x=1
y=1
id=Konrad
[/filter]
[message]
speaker=unit
message= _ "Very well, we have made it this far! But where do we go next?"
[/message]
# wmllint: local spellings HttT
[message]
speaker=Delfador
message= _ "In HttT, we would travel north now, and try to make it to the Isle of Alduin. But for this demo campaign, we'll call it good here."
[/message]
# So that game goes on to next scenario
[modify_side]
side=7
controller=human
[/modify_side]
[endlevel]
result=victory
bonus=no
carryover_percentage=0
carryover_report=no
linger_mode=no
[/endlevel]
[/event]
[event]
name=last breath
[filter]
id=Konrad
[/filter]
[message]
speaker=unit
message= _ "I... I don’t think I can make it anymore."
[/message]
[message]
speaker=Delfador
message= _ "Prince... you must keep fighting! Nooooooo!"
[/message]
[message]
speaker=unit
message= _ "It is over. I am doomed..."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=last breath
[filter]
id=Delfador
[/filter]
[message]
speaker=unit
message= _ "I have... have failed in my duty to protect the prince! I am defeated."
[/message]
[message]
speaker=Konrad
message= _ "Don’t die, Delfador! Please, you have to stay alive!"
[/message]
[message]
speaker=unit
message= _ "Ugh!"
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=time over
[message]
speaker=Delfador
message= _ "Oh, no! We have run out of time, they have arrived with reinforcements..."
[/message]
[/event]
[/test]