1#textdomain wesnoth-sota
2
3# -------------
4# Conventions for SoTA Scenario Files:
5# There are four sections to most scenario files. The first is story, map, side
6# definitions, and schedule. Then there is prestart, play, and opening/ending. These
7# three sections are clearly marked. Prestart just has the prestart event. Opening/ending
8# contains most of the dialog and the scenario-ending events. Play has everything else.
9# Macros are usually defined right before the event in which they are used. However, if
10# they are very long or used in more than one section, they get their own marked section
11# just before prestart. If they are used in more than one scenario, they go in sota-utils.
12# -------------
13
14# The placement of enemies in this scenario is carefully adjusted rather than totally
15# random. That's why there are so many macro calls. Wild animals can't pass through
16# fences. To block them, we use a custom terrain overlay (code: ^Fync). It is a copy of
17# the core fence, except that it is an alias of unwalkable. Bats are unaffected because
18# they are flying, and Ardonna gets an object that lets her go through unwalkable terrain
19# until the end of this scenario.
20
21[scenario]
22    name= _ "Slipping Away"
23    map_data="{campaigns/Secrets_of_the_Ancients/maps/01_Slipping_Away.map}"
24
25    id=01_Slipping_Away
26    next_scenario=02_Dark_Business
27    victory_when_enemies_defeated=no
28    [story]
29        [part]
30            [background_layer]
31                image=story/black-background.png
32                scale=yes
33                base_layer=yes
34            [/background_layer]
35            [image]
36                x,y=400,200
37                centered=yes
38                file=story/book.png
39            [/image]
40            title= _ "<i>Chapter One:</i> Unlawful Research"
41            show_title=yes
42            title_alignment=left
43            story= _ "<i>From the Journal of Ardonna of Tarrynth</i>
44
459 XII, 22 YW:
46
47It’s unfair that we humans must die after so few years. Elves and dwarves live far longer. Though this may be the natural order, we need not embrace it! The lords on the Green Isle knew how to live forever. Pursuit of that knowledge was declared illegal by King Haldric I, but I believe it is worth the risk. As I watched my family waste away of various maladies, I vowed that I would not share their fate, and if I can rediscover the secrets of the ancients I will be a hero to the whole continent! I shall begin research in earnest this winter."
48        [/part]
49        [part]
50            [background_layer]
51                image=story/room1.jpg
52                scale=no
53            [/background_layer]
54            story= _ "26 II, 23 YW:
55
56My experiments with bats have proven unfruitful. I have determined that they do not truly drain the life force of their victims — it is an illusion. The loss of blood weakens the victim, while the bat gains vitality because it has fed. There is nothing I can learn from bats about extending life. Now I have a problem. I am forced to keep the bats and pretend they are my pets because I cannot admit why I was studying them. In truth, it is not a burden — I have grown somewhat fond of the creatures, and I don’t mind appearing eccentric. I am already marked as different because my hair is so light, and I lack a sense of smell."
57        [/part]
58        [part]
59            [background_layer]
60                image=story/room2.jpg
61                scale=no
62            [/background_layer]
63            story=_ "4 III, 23 YW:
64
65Today, headmaster Aimucasur himself taught a class on moving objects with one’s mind. The technique involves projecting one’s will inside the item, and then learning to move it as an extension of the body. Incantations focus the mind to the task. We practiced with inanimate objects, but clearly the same principle could be applied to unliving flesh. Nobody dared voice the thought, because showing interest in the necromantic arts results in expulsion. I was pondering that fact in class when I noticed Aimucasur glowering at me. I must be more careful in the future about which of my thoughts appear on my face."
66        [/part]
67        [part]
68            [background_layer]
69                image=story/room3.jpg
70                scale=no
71            [/background_layer]
72            story= _ "15 III, 23 YW:
73
74One of my bats must have been old, for it died. Boldly then, I decided to animate the corpse. I was pleased to see that it worked, but what was interesting was this: The first time the bat twitched, I felt a last spark of life energy flash through its body. I noted that it flowed through some kind of pathway. That gave me an idea. With my mind, I searched out all the life force pathways in its body using what I could sense in the living bats as a guide. Then I animated <i>them</i> all at once, and the bat slowly flapped off the floor on its own! (That is a trick old Aimucasur probably doesn’t know!) Even better, the energy running through the life force network seemed to maintain itself, so I didn’t need to continue to concentrate. Could this be the whole secret? Could all the ancient lords have had someone bring them back <i>after</i> death? I would need another mage I trusted completely, but perhaps I can find someone with whom to make a pact."
75        [/part]
76        [part]
77            [background_layer]
78                image=story/room4.jpg
79                scale=no
80            [/background_layer]
81            story= _ "Later:
82
83With further observation, I have determined that this is probably not the way to avoid death. The reanimated bat has no will! It does nothing unless I nudge it with my mind. Perhaps the will of a human is stronger, and someday soon I will have the opportunity to find out... because I’m quitting the Academy. I will be in my room when old Morvihn checks for the night, but not two hours later! I grow weary of this place and its restrictions on thought. So, no more brown initiate’s robes, no more being ridiculed on account of my hair, no more pompous instructors. I will teach myself the so-called “dark” arts and learn how to live forever! The ancients from the Green Isle found a way, so I can discover it too. When all these oldsters here find themselves breathing their last, they will have to beg me for the secret. Perhaps I will be generous. Perhaps not."
84        [/part]
85        {JOURNEY_PART 1}
86    [/story]
87
88    {FIRST_WATCH_HOUR2}
89    {FIRST_WATCH_HOUR2}
90    {FIRST_WATCH_HOUR3}
91    {FIRST_WATCH_HOUR3}
92    {FIRST_WATCH_HOUR4}
93    {FIRST_WATCH_HOUR4}
94    {MIDNIGHT_HOUR}
95    {MIDNIGHT_HOUR}
96    {SECOND_WATCH_HOUR1}
97    {SECOND_WATCH_HOUR1}
98    {SECOND_WATCH_HOUR2}
99    {SECOND_WATCH_HOUR2}
100    {SECOND_WATCH_HOUR3}
101    {SECOND_WATCH_HOUR3}
102    {SECOND_WATCH_HOUR4}
103    {SECOND_WATCH_HOUR4}
104    {SECOND_WATCH_HOUR5}
105    {SECOND_WATCH_HOUR5}
106    {SECOND_WATCH_HOUR6}
107    {SECOND_WATCH_HOUR6}
108    {DAWN_HOUR}
109
110    {DEFAULT_MUSIC_PLAYLIST}
111    {TURNS 20 20 20}
112
113    [side]
114        # wmllint: who SIDE_1_ARDONNA_EARLY is Ardonna
115        {SIDE_1_ARDONNA_EARLY}
116        facing=se
117        {GOLD 15 5 0}
118        fog=yes
119    [/side]
120
121    [side]
122        side=2
123        controller=ai
124        no_leader=yes
125        hidden=yes
126    [/side]
127
128    # *************************** MACROS ***************************
129#define PLACE_BAT X Y TRAIT1
130    [unit]
131        type=Vampire Bat SotA
132        x={X}
133        y={Y}
134        side=1
135        [modifications]
136            {TRAIT_{TRAIT1}}
137        [/modifications]
138    [/unit]
139#enddef
140
141#define PLACE_WOLF X Y TRAIT1 TRAIT2 SPECIAL
142    [unit]
143        type=Wolf
144        x={X}
145        y={Y}
146        side=2
147        [modifications]
148            {TRAIT_{TRAIT1}}
149            {TRAIT_{TRAIT2}}
150        [/modifications]
151        {SPECIAL}
152    [/unit]
153#enddef
154
155#define PLACE_RAT X Y
156    [unit]
157        type=Giant Rat
158        x={X}
159        y={Y}
160        side=2
161    [/unit]
162#enddef
163
164    # *************************** PRESTART ***************************
165    [event]
166        name=prestart
167
168        [objectives]
169            side=1
170            [objective]
171                description= _ "Move Ardonna to the signpost"
172                condition=win
173            [/objective]
174
175            {HOW_TO_LOSE_WITH_ARDONNA}
176
177            [gold_carryover]
178                bonus=yes
179                carryover_percentage=40
180            [/gold_carryover]
181
182            [note]
183                description= _ "This scenario takes place entirely at night."
184            [/note]
185            [note]
186                description= _ "Ardonna can climb over a fence for 2 movement points, but wild animals cannot."
187            [/note]
188        [/objectives]
189
190        [label]
191            x,y=39,2
192            text= _ "Llorvin"  # The name of the town mentioned in the opening.
193        [/label]
194
195        # Player's starting units:
196        {PLACE_BAT 5 23 QUICK}
197        {PLACE_BAT 4 23 RESILIENT}
198        {PLACE_BAT 4 24 INTELLIGENT}
199        {PLACE_BAT 5 25 STRONG}
200        {PLACE_BAT 6 24 RESILIENT}
201        [unit]
202            x,y=6,23
203            type=Walking Corpse
204            variation=bat
205            side=1
206        [/unit]
207
208        # Fences are unwalkable, but not for Ardonna.
209        [object]
210            silent=yes
211            duration=scenario
212            [filter]
213                id=Ardonna
214            [/filter]
215            [effect]
216                apply_to=movement_costs
217                replace=yes
218                [movement_costs]
219                    unwalkable=2
220                [/movement_costs]
221            [/effect]
222            [effect]
223                apply_to=defense
224                replace=yes
225                [defense]
226                    unwalkable=50
227                [/defense]
228            [/effect]
229        [/object]
230
231        {PLACE_WOLF 39 4 QUICK RESILIENT ai_special=guardian}
232        {PLACE_WOLF 35 2 RESILIENT INTELLIGENT ai_special=guardian}
233        {PLACE_WOLF 17 16 QUICK INTELLIGENT ()}
234        {PLACE_RAT 26 1}
235        {PLACE_RAT 38 14}
236        {PLACE_RAT 24 20}
237        {PLACE_RAT 28 8}
238#ifdef EASY
239        {PLACE_WOLF 35 4 AGED RESILIENT ()}
240#endif
241#ifndef EASY
242        {PLACE_WOLF 24 7 QUICK RESILIENT ()}
243        {PLACE_WOLF 42 1 STRONG INTELLIGENT ()}
244        {PLACE_RAT 25 21}
245#endif
246#ifdef HARD
247        {PLACE_WOLF 42 25 STRONG RESILIENT ()}
248#endif
249    [/event]
250
251    # *************************** PLAY ***************************
252    [event]
253        name=turn 6
254        {PLACE_RAT 25 1}
255        {PLACE_RAT 42 21}
256    [/event]
257
258    [event]
259        name=turn 7
260        {PLACE_WOLF 10 25 QUICK INTELLIGENT ()}
261#ifndef EASY
262        {PLACE_WOLF 23 1 QUICK STRONG ()}
263        {PLACE_WOLF 42 21 STRONG RESILIENT ()}
264#endif
265#ifdef HARD
266        {PLACE_WOLF 42 22 QUICK RESILIENT ()}
267        {PLACE_WOLF 15 1 RESILIENT INTELLIGENT ()}
268#endif
269    [/event]
270
271    # This macro is to make rats move out of the castle instead of simply materializing.
272#define MOVE_AND_PLACE_RAT X Y
273    [move_unit_fake]
274        type=Giant Rat
275        x=28,{X}
276        y=16,{Y}
277        side=2
278    [/move_unit_fake]
279    {PLACE_RAT {X} {Y}}
280#enddef
281
282    [event]
283        name=recruit
284
285        [event]
286            name=side 2 turn end
287            {MOVE_AND_PLACE_RAT 27 16}
288            {MOVE_AND_PLACE_RAT 29 17}
289#ifndef EASY
290            {MOVE_AND_PLACE_RAT 28 15}
291            {MOVE_AND_PLACE_RAT 29 16}
292#endif
293            [message]
294                speaker=Ardonna
295                message= _ "I suspected some of the rats would show themselves."
296            [/message]
297        [/event]
298    [/event]
299
300    # *************************** OPENING / ENDING ***************************
301    [event]
302        name=start
303        [message]
304            speaker=Ardonna
305            message= _ "I should get off the island in case the ethics committee is concerned about a rogue mage. I shall not be dragged back in disgrace! I should be able to reach the town of Llorvin before morning. I can hide there until I can head for the dock. I will need some traveling money for that, so go, my bat friends, and find me some gold!"
306        [/message]
307        [message]
308            speaker=Ardonna
309            message= _ "It would be good to have even more bats as well. There was a colony in that ruined castle where we practiced conjuring fire, so I will try to find that. The castle was also infested with huge rats as I remember, but I can certainly destroy those. I will have to use ice though, as I never mastered fire."
310        [/message]
311        {HIGHLIGHT_IMAGE 39 2 "scenery/signpost.png" ()}
312    [/event]
313
314    [event]
315        name=sighted
316        [filter]
317            race=wolf
318        [/filter]
319        [message]
320            speaker=Ardonna
321            message= _ "A wolf! This journey may be more dangerous than I thought. If we need to, I suppose we could rest inside a farmer's or woodcutter's fence."
322        [/message]
323    [/event]
324
325    [event]
326        name=moveto
327        [filter]
328            id=Ardonna
329            x,y=39,2
330        [/filter]
331
332        [endlevel]
333            result=victory
334            bonus=yes
335            {NEW_GOLD_CARRYOVER 40}
336        [/endlevel]
337    [/event]
338
339    [event]
340        name=time over
341
342        [message]
343            speaker=Ardonna
344            message= _ "The morning has come, and I am still in the open. I will be caught for sure!"
345        [/message]
346    [/event]
347
348    {HERO_DEATHS}
349    {MANAGE_PROFILE}
350
351#undef PLACE_WOLF
352#undef PLACE_BAT
353#undef PLACE_RAT
354#undef MOVE_AND_PLACE_RAT
355[/scenario]
356