1#textdomain wesnoth-trow
2[scenario]
3    id=17c_Troll_Hole
4    name= _ "Troll Hole"
5    next_scenario=16_The_Kalian
6    map_data="{campaigns/The_Rise_Of_Wesnoth/maps/17c_Troll_Hole.map}"
7
8    {TURNS 39 36 33}
9    {UNDERGROUND}
10
11    {SCENARIO_MUSIC underground.ogg}
12
13    # No story
14    {TROW_GC_TRACK {JOURNEY_17C_NEW} }
15
16    {TROW_DEATHS}
17
18    [side]
19        type=Noble Commander
20        id=Prince Haldric
21        name= _ "Prince Haldric"
22        unrenamable=yes
23        side=1
24        canrecruit=yes
25        gold=200
26        controller=human
27        shroud=yes
28        team_name=Haldric
29        user_team_name=_"Refugees"
30        {INCOME 8 4 2}
31        {FLAG_VARIANT loyalist}
32    [/side]
33
34    [side]
35        type=Troll Warrior
36        id=Erart
37        name= _ "Erart"
38        side=2
39        canrecruit=yes
40        {GOLD 80 140 200}
41        {INCOME 2 4 8}
42        team_name=Troll
43        user_team_name=_"Trolls"
44        recruit=Troll Whelp,Troll,Troll Rocklobber
45        [ai]
46            {NO_SCOUTS}
47            recruitment_pattern=fighter,fighter,mixed fighter
48            aggression=0.75
49            {ATTACK_DEPTH 3 5 5}
50        [/ai]
51    [/side]
52
53    {STARTING_VILLAGES 2 10}
54
55    [side]
56        type=Troll Warrior
57        id=Raol
58        name= _ "Raol"
59        side=3
60        canrecruit=yes
61        {GOLD 80 140 200}
62        {INCOME 2 4 8}
63        team_name=Troll
64        user_team_name=_"Trolls"
65        recruit=Troll Whelp,Troll,Troll Rocklobber
66        [ai]
67            {NO_SCOUTS}
68            recruitment_pattern=fighter,fighter,mixed fighter
69            aggression=0.75
70            {ATTACK_DEPTH 3 5 5}
71        [/ai]
72    [/side]
73
74    {STARTING_VILLAGES 3 10}
75
76    [side]
77        type=Troll Warrior
78        id=Rilg
79        name= _ "Rilg"
80        side=4
81        canrecruit=yes
82        {GOLD 80 140 200}
83        {INCOME 2 4 8}
84        team_name=Troll
85        user_team_name=_"Trolls"
86        recruit=Troll Whelp,Troll,Troll Rocklobber
87        [ai]
88            {NO_SCOUTS}
89            recruitment_pattern=fighter,fighter,mixed fighter
90            aggression=0.75
91            {ATTACK_DEPTH 3 5 5}
92        [/ai]
93    [/side]
94
95    {STARTING_VILLAGES 4 10}
96
97    [side]
98        type=Troll Warrior
99        id=Gulg
100        name= _ "Gulg"
101        side=5
102        canrecruit=yes
103        {GOLD 80 140 200}
104        {INCOME 2 4 8}
105        team_name=Troll
106        user_team_name=_"Trolls"
107        recruit=Troll Whelp,Troll,Troll Rocklobber
108        [ai]
109            {NO_SCOUTS}
110            recruitment_pattern=fighter,fighter,mixed fighter
111            aggression=0.75
112            {ATTACK_DEPTH 3 5 5}
113        [/ai]
114    [/side]
115
116    {STARTING_VILLAGES 5 10}
117
118#ifdef EASY
119    {LIMIT_CONTEMPORANEOUS_RECRUITS 2,3,4,5 "Troll" 1}
120    {LIMIT_CONTEMPORANEOUS_RECRUITS 2,3,4,5 "Troll Rocklobber" 1}
121#else
122    {LIMIT_CONTEMPORANEOUS_RECRUITS 2,3,4,5 "Troll" 2}
123    {LIMIT_CONTEMPORANEOUS_RECRUITS 2,3,4,5 "Troll Rocklobber" 2}
124#endif
125
126    {campaigns/The_Rise_Of_Wesnoth/utils/trow-nlmsg.cfg}
127
128    [event]
129        name=prestart
130
131        {PLACE_IMAGE (scenery/rubble.png) 3 14}
132        {PLACE_IMAGE (scenery/rubble.png) 25 19}
133        {PLACE_IMAGE (scenery/rubble.png) 15 3}
134        {PLACE_IMAGE (scenery/rubble.png) 17 27}
135
136        {LOYAL_UNIT 2 (Tentacle of the Deep) 15 11}
137        {LOYAL_UNIT 3 (Tentacle of the Deep) 14 19}
138
139#ifdef NORMAL
140        {LOYAL_UNIT 4 (Tentacle of the Deep) 11 15}
141        {LOYAL_UNIT 5 (Tentacle of the Deep) 19 17}
142#endif
143#ifdef HARD
144
145        {LOYAL_UNIT 4 (Tentacle of the Deep) 11 15}
146        {LOYAL_UNIT 5 (Tentacle of the Deep) 19 17}
147        {LOYAL_UNIT 2 (Tentacle of the Deep) 11 17}
148        {LOYAL_UNIT 3 (Tentacle of the Deep) 19 15}
149#endif
150
151        {RANDOM 1..4}
152        [if]
153            [variable]
154                name=random
155                numerical_equals=1
156            [/variable]
157            [then]
158                [kill]
159                    id=Erart
160                [/kill]
161                {GUARD_UNIT (Giant Spider) () ( _ "Fang") 3 5 5}
162                [kill]
163                    id=Raol
164                [/kill]
165                {GUARD_UNIT (Giant Spider) () ( _ "Fang") 2 25 5}
166            [/then]
167        [/if]
168        [if]
169            [variable]
170                name=random
171                numerical_equals=2
172            [/variable]
173            [then]
174                [kill]
175                    id=Raol
176                [/kill]
177                {GUARD_UNIT (Giant Spider) () ( _ "Fang") 2 25 5}
178                [kill]
179                    id=Rilg
180                [/kill]
181                {GUARD_UNIT (Giant Spider) () ( _ "Fang") 5 5 25}
182            [/then]
183        [/if]
184        [if]
185            [variable]
186                name=random
187                numerical_equals=3
188            [/variable]
189            [then]
190                [kill]
191                    id=Rilg
192                [/kill]
193                {GUARD_UNIT (Giant Spider) () ( _ "Fang") 5 5 25}
194                [kill]
195                    id=Gulg
196                [/kill]
197                {GUARD_UNIT (Giant Spider) () ( _ "Fang") 4 25 25}
198            [/then]
199        [/if]
200        [if]
201            [variable]
202                name=random
203                numerical_equals=4
204            [/variable]
205            [then]
206                [kill]
207                    id=Gulg
208                [/kill]
209                {GUARD_UNIT (Giant Spider) () ( _ "Fang") 4 25 25}
210                [kill]
211                    id=Erart
212                [/kill]
213                {GUARD_UNIT (Giant Spider) () ( _ "Fang") 3 5 5}
214            [/then]
215        [/if]
216
217        [recall]
218            id=Lady Jessene
219            x=14
220            y=15
221        [/recall]
222        [recall]
223            id=Burin the Lost
224            x=16
225            y=14
226        [/recall]
227        [recall]
228            id=Minister Edren
229            x=15
230            y=16
231        [/recall]
232
233        [objectives]
234            side=1
235            [objective]
236                description= _ "Defeat all enemy leaders"
237                condition=win
238            [/objective]
239            [objective]
240                description= _ "Death of Prince Haldric"
241                condition=lose
242            [/objective]
243            [objective]
244                description= _ "Death of Lady Jessene"
245                condition=lose
246            [/objective]
247
248            {TURNS_RUN_OUT}
249
250            [gold_carryover]
251                bonus=yes
252                carryover_percentage=40
253            [/gold_carryover]
254        [/objectives]
255    [/event]
256
257    [event]
258        name=start
259        [message]
260            speaker=narrator
261            message= _ "It isn’t long before Haldric and his companions enter the Brown Hills. An elven guide leads them to a gaping cave mouth, and they descend into the darkness."
262            image=wesnoth-icon.png
263        [/message]
264
265        [message]
266            speaker=Prince Haldric
267            message= _ "Does anybody actually know anything about Trolls?"
268        [/message]
269
270        [message]
271            speaker=Burin the Lost
272            message= _ "I indeed do. They are ugly and mean, and will try to crush you like a bug. They heal very quickly."
273        [/message]
274
275        [message]
276            speaker=Lady Jessene
277            message= _ "Hmm... Do we really need to know that much about the trolls? I think it’s safe to say that the elves wouldn’t have sent us down here if they were at all friendly."
278        [/message]
279
280        [message]
281            speaker=Prince Haldric
282            message= _ "Fair enough. Well, let’s get them!"
283            image=portraits/haldric-mad.png
284        [/message]
285    [/event]
286
287    [event]
288        name=time over
289        [message]
290            speaker=Prince Haldric
291            message= _ "We have failed... More of the trolls’ kin are arriving through the entrance."
292            image=portraits/haldric-surprised.png
293        [/message]
294    [/event]
295
296    [event]
297        name=die
298        [filter]
299            id=Erart
300        [/filter]
301        {LOOT 50 1}
302    [/event]
303
304    [event]
305        name=die
306        [filter]
307            id=Raol
308        [/filter]
309        {LOOT 50 1}
310    [/event]
311
312    [event]
313        name=die
314        [filter]
315            id=Rilg
316        [/filter]
317        {LOOT 50 1}
318    [/event]
319
320    [event]
321        name=die
322        [filter]
323            id=Gulg
324        [/filter]
325        {LOOT 50 1}
326    [/event]
327
328    [event]
329        name=enemies defeated
330        [message]
331            speaker=Prince Haldric
332            message= _ "The trolls are beaten, but they were no easy opponents. It is no wonder why the elves pressed us to do their dirty work."
333        [/message]
334
335        {VARIABLE_OP num_done add 1}
336
337        [set_variable]
338            name=troll_hole
339            value=1
340        [/set_variable]
341
342        [set_variable]
343            name=last_done
344            value="Hole"
345        [/set_variable]
346
347        {CLEAR_VARIABLE random}
348
349        [endlevel]
350            result=victory
351            bonus=yes
352            {NEW_GOLD_CARRYOVER 40}
353        [/endlevel]
354    [/event]
355[/scenario]
356