1#textdomain wesnoth-utbs
2
3[scenario]
4    id=04_Descending_into_Darkness
5    name= _ "Descending into Darkness"
6    next_scenario=05_A_Subterranean_Struggle
7    {UTBS_MAP 04_Descending_into_Darkness.map}
8    victory_when_enemies_defeated=no
9
10    {TWO_SUNS_DEFAULT_SCHEDULE}
11    {TURNS 50 48 46}
12
13    {INTRO_AND_SCENARIO_MUSIC "northerners.ogg" "suspense.ogg"}
14    {EXTRA_SCENARIO_MUSIC "vengeful.ogg"}
15    {EXTRA_SCENARIO_MUSIC "frantic.ogg"}
16
17    {STORY_DESCENDING_INTO_DARKNESS}
18
19    [side]
20        side=1
21        id=Kaleh
22        type=Quenoth Youth
23        canrecruit=yes
24        gold=200
25        {INCOME 6 4 2}
26        controller=human
27        shroud=yes
28        fog=no
29        {FLAG_VARIANT long}
30        user_team_name= _ "team_name^Quenoth Elves"
31    [/side]
32
33    # Orcish leaders
34
35    # The front line leader is a goblin who recruits goblins and orcs,
36    # more scouts/weaker units than the other orcs.
37    # He is also more aggressive.
38    [side]
39        side=2
40        id=Panok
41        name= _ "Panok"
42#ifdef HARD
43        type=Direwolf Rider
44#else
45        type=Goblin Knight
46#endif
47        canrecruit=yes
48
49        {INCOME 3 5 7}
50        {GOLD 75 100 125}
51        controller=ai
52        shroud=no
53        fog=no
54        team_name=evil
55        user_team_name=_"Evil"
56#ifdef EASY
57        recruit=Orcish Grunt,Wolf Rider,Goblin Spearman,Orcish Archer
58#endif
59#ifdef NORMAL
60        recruit=Orcish Grunt,Wolf Rider,Goblin Impaler,Orcish Archer,Goblin Knight
61#endif
62#ifdef HARD
63        recruit=Orcish Warrior,Wolf Rider,Goblin Impaler,Orcish Crossbowman,Goblin Knight
64#endif
65        [ai]
66            #orc leader guarding front lines is more aggressive
67            aggression=0.8
68            caution=0.1
69
70#ifdef EASY
71            recruitment_pattern=scout,scout,fighter,fighter,archer
72#endif
73#ifdef NORMAL
74            recruitment_pattern=scout,scout,fighter,fighter,fighter,archer
75#endif
76#ifdef HARD
77            recruitment_pattern=scout,scout,fighter,fighter,archer,fighter
78#endif
79        [/ai]
80        {FLAG_VARIANT6 ragged}
81    [/side]
82
83    # this orc tribe specialized in ranged combat
84    [side]
85        side=3
86        id=Turg
87        name= _ "Turg"
88#ifdef EASY
89        type=Orcish Warrior
90#else
91        type=Orcish Warlord
92#endif
93        canrecruit=yes
94
95        {INCOME 1 3 5}
96        {GOLD 75 100 125}
97        controller=ai
98        shroud=no
99        fog=no
100        team_name=evil
101        user_team_name=_"Evil"
102#ifdef EASY
103        recruit=Orcish Grunt,Wolf Rider,Orcish Archer,Orcish Assassin,Orcish Crossbowman
104#endif
105#ifdef NORMAL
106        recruit=Orcish Grunt,Wolf Rider,Orcish Archer,Orcish Crossbowman,Orcish Slayer,Orcish Warrior
107#endif
108#ifdef HARD
109        recruit=Orcish Warrior,Wolf Rider,Orcish Crossbowman,Orcish Slayer
110#endif
111
112        [ai]
113            aggression=0.5
114            recruitment_pattern=scout,fighter,archer,fighter,archer,mixed fighter
115
116#ifdef EASY
117            recruitment_pattern=scout,fighter,archer,fighter,fighter,mixed fighter
118#endif
119        [/ai]
120        {FLAG_VARIANT6 ragged}
121    [/side]
122
123    # this orc tribe specialized in melee combat
124    [side]
125        side=4
126        id="Ug'lok"
127        name= _ "Ug’lok"
128#ifdef EASY
129        type=Orcish Warrior
130#else
131        type=Orcish Warlord
132#endif
133        canrecruit=yes
134        {INCOME 1 3 5}
135        {GOLD 75 100 125}
136        controller=ai
137        shroud=no
138        fog=no
139        team_name=evil
140        user_team_name=_"Evil"
141#ifdef EASY
142        recruit=Orcish Grunt,Wolf Rider,Orcish Archer,Orcish Assassin,Orcish Warrior
143#endif
144#ifdef NORMAL
145        recruit=Orcish Warrior,Wolf Rider,Orcish Archer,Orcish Slayer,Orcish Crossbowman
146#endif
147#ifdef HARD
148        recruit=Orcish Warrior,Wolf Rider,Orcish Crossbowman,Orcish Slayer
149#endif
150
151        [ai]
152            aggression=0.5
153            recruitment_pattern=scout,fighter,archer,fighter,archer,mixed fighter
154        [/ai]
155        {FLAG_VARIANT6 ragged}
156    [/side]
157
158    # assassin's side
159    [side]
160        side=5
161        no_leader=yes
162        controller=ai
163        shroud=no
164        fog=no
165        team_name=evil
166        user_team_name=_"Evil"
167
168        [ai]
169            aggression=1.0
170            caution=0.0
171            [goal]
172                name=target
173                [criteria]
174                    id=Kaleh
175                [/criteria]
176                value=1000
177            [/goal]
178        [/ai]
179    [/side]
180
181    # Prestart functions:
182    # set scenario objectives
183    # increase cost of recruiting units
184    # recall main heroes
185    # initialize starting variables
186    # added extra NW bridge in EASY
187    # randomly close one of the two exit tunnels at north of map
188    # if EASY open up NW cave entrance bottleneck
189    # give side 3 (green) control of cave villages
190    # place features on map
191    # increase speed of goblin knight Panok
192
193    [event]
194        name=prestart
195
196        [objectives]
197            summary= _ "Objectives:"
198            [objective]
199                description= _ "Kaleh must reach the exit tunnel at the north edge of the map"
200                condition=win
201            [/objective]
202
203            [objective]
204                description= _ "Death of Kaleh"
205                condition=lose
206            [/objective]
207            [objective]
208                description= _ "Death of Nym"
209                condition=lose
210            [/objective]
211            [objective]
212                description= _ "Death of Zhul"
213                condition=lose
214            [/objective]
215
216            {TURNS_RUN_OUT}
217
218            [gold_carryover]
219                bonus=yes
220                carryover_percentage=40
221            [/gold_carryover]
222        [/objectives]
223
224        #recall heroes
225        [recall]
226            id=Nym
227        [/recall]
228
229        [recall]
230            id=Zhul
231        [/recall]
232
233        [recall]
234            id=Elyssa
235        [/recall]
236
237        #initialize variables
238        [set_variable]
239            name=naga_ambush
240            value=0
241        [/set_variable]
242
243        #close one of the two northern tunnels
244        {RANDOM 1..10}
245
246        [if]
247            [variable]
248                name=random
249                less_than_equal_to=5
250            [/variable]
251            [then]
252                #Western tunnel
253                #to cavewall: 10,4
254
255                [terrain]
256                    x=10
257                    y=4
258                    terrain=Xu
259                [/terrain]
260            [/then]
261
262            [else]
263                #Eastern tunnel
264                #to cavewall: 25,4 25,6 26,6 also 26,5 24,4 and 25,3 24,2
265                #to shallow water 25,5
266
267                [terrain]
268                    x=24,25,25,26,26,25,24
269                    y=4,4,6,5,6,3,2
270                    terrain=Xu
271                [/terrain]
272
273                [terrain]
274                    x=25
275                    y=5
276                    terrain=Wwg
277                [/terrain]
278            [/else]
279        [/if]
280
281        #on EASY difficulty, weaken orcs by deleting 2 towns
282#ifdef EASY
283        [terrain]
284            x= 4,23
285            y=19,11
286            terrain=Uu
287        [/terrain]
288#endif
289
290        # green (side 4) should control southern 4 cave villages at start
291        # 2,15 4,19 6,17 9,16
292        [capture_village]
293            side=3
294            x= 2, 4, 6, 9
295            y=15,19,17,16
296        [/capture_village]
297
298        #side 1 (player) controls two villages at start
299        [capture_village]
300            side=1
301            x=33,39
302            y=39,38
303        [/capture_village]
304
305        {PLACE_IMAGE items/orcish-flag.png 36 33}
306        {PLACE_IMAGE items/orcish-flag2.png 30 33}
307        {PLACE_IMAGE items/orcish-flag.png 30 37}
308
309        {PLACE_IMAGE items/orcish-flag3.png 31 16}
310        {PLACE_IMAGE items/orcish-flag2.png 33 16}
311        {PLACE_IMAGE items/orcish-flag.png 10 25}
312        {PLACE_IMAGE items/orcish-flag.png 11 24}
313
314        {PLACE_IMAGE scenery/signpost.png 7 1}
315
316        #increase max moves by 1 (game engine will increase current moves to match)
317        [object]
318            id=FastGoblinKnight
319            silent=yes
320
321            [effect]
322                apply_to=movement
323                increase=1
324            [/effect]
325
326            [filter]
327                id=Panok
328            [/filter]
329        [/object]
330
331        # show the area outside the cave if the player found the map last scenario
332        [if]
333            [variable]
334                name=sneak_up
335                equals=1
336            [/variable]
337            [then]
338                [remove_shroud]
339                    [not]
340                        time_of_day_id=underground
341                    [/not]
342                    radius=1
343                    side=1
344                [/remove_shroud]
345            [/then]
346        [/if]
347
348        {CLEAR_VARIABLE sneak_up}
349    [/event]
350
351    # starting dialogue
352    [event]
353        name=start
354
355        [message]
356            speaker=Nym
357            message= _ "Those mountains are huge! I never thought they would be so big. And what’s that white stuff on the tops of the peaks?"
358        [/message]
359
360        [message]
361            speaker=Zhul
362            message= _ "I wish Garak were here, he’d know more about these lands than I do. I’ve never been up here, but I heard stories from the few who have made the journey and returned. That white stuff is called snow, Nym, and the mountains are very cold. These smaller hills aren’t as hard to cross, but they are filled with orcs and goblins. It may look peaceful now, but they hide in the many caves and tunnels beneath the surface."
363        [/message]
364
365        [message]
366            speaker=Kaleh
367            message= _ "I had another vision last night, Eloh told me that we had to continue north, but instead of trying to go over the mountains, she said that we had to go underneath them."
368        [/message]
369
370        [message]
371            speaker=Nym
372            message= _ "Underneath them? But how?"
373        [/message]
374
375        [message]
376            speaker=Zhul
377            message= _ "Orcs and Goblins have been living here for hundreds of years and their network of tunnels and caves is more extensive than you might think. Who knows how far they go underground? We are ill-prepared for trekking over those frozen peaks. As much as I dislike those pitch-black caves, if we want to cross these mountains we may have no choice."
378        [/message]
379
380        [message]
381            speaker=Elyssa
382            message= _ "Other creatures besides orcs dig tunnels in the earth. Long ago dwarves mined mountains such as these, and huge trolls like to hide in the deep dark places under the earth. If your god is as omniscient as you seem to think, Kaleh, I wouldn’t be surprised if there were a way to cross under these mountains. I fear no darkness, and you won’t be lacking a source of fire or light."
383        [/message]
384
385        [message]
386            speaker=Nym
387            message= _ "Well if we are going to go under these mountains, we’re certainly going to have our hands full fighting all those orcs and goblins."
388        [/message]
389
390        [message]
391            speaker=Zhul
392            message= _ "Indeed. I want to warn you again, Kaleh, this isn’t the desert. The orcs love fighting in hills and caves, and we won’t have the advantages of fighting on the open sands. And with our recent losses we don’t have the numerical advantage we are used to. So we’d best be extra careful. Still if we can clear a path in the hills ahead of us, we should be able to escort our people into the tunnels. And hopefully underground it will be easier to protect them than out in the open."
393        [/message]
394
395        [message]
396            speaker=Kaleh
397            message= _ "Strike hard and fast and also be careful—right, this is going to be fun."
398        [/message]
399    [/event]
400
401    # underground area should always have "underground" time,
402    [time_area]
403        x= 0-2,   3,   4,   5,   6,   7,   8,   9,  10,  11,12-13,14-15,16-17,18-21,22-25,26-31,  32,  33,34-38,39-41
404        y=0-41,0-37,0-34,0-32,0-31,0-29,0-28,0-26,0-23,0-22, 0-21, 0-20, 0-19, 0-18, 0-17, 0-15,0-14,0-15, 0-14, 0-15
405        {UNDERGROUND}
406    [/time_area]
407
408    # Event 1: goblins appear in nearby foothills
409
410    # ambushes player at start of player’s turn after player invades hills
411
412    [event]
413        name=moveto
414
415        [filter]
416            x=30-40,23-31
417            y=28-35,30-40
418            side=1
419        [/filter]
420
421        [event]
422            name=side 1 turn
423
424            #If Easy: 5 goblins
425
426            {NAMED_NOTRAIT_UNIT 2 (Goblin Spearman) 28 37 (Goblin Coward) ( _ "Goblin Coward")}
427            {NAMED_NOTRAIT_UNIT 2 (Goblin Spearman) 29 33 (Goblin Scout) ( _ "Goblin Scout")}
428            {NAMED_NOTRAIT_UNIT 2 (Goblin Spearman) 38 31 () ( _ "Goblin Scout")}
429            {NAMED_NOTRAIT_UNIT 2 (Goblin Spearman) 37 34 () ( _ "Goblin Scout")}
430            {NAMED_NOTRAIT_UNIT 2 (Goblin Spearman) 30 38 () ( _ "Goblin Scout")}
431
432#ifndef EASY
433            #If Medium: +3 goblins (8)
434
435            {NAMED_NOTRAIT_UNIT 2 (Goblin Spearman) 26 35 () ( _ "Goblin Scout")}
436            {NAMED_NOTRAIT_UNIT 2 (Goblin Spearman) 33 32 () ( _ "Goblin Scout")}
437            {NAMED_NOTRAIT_UNIT 2 (Goblin Spearman) 27 32 () ( _ "Goblin Scout")}
438
439            #If Hard: +3 goblins (11)
440#ifdef HARD
441            {NAMED_NOTRAIT_UNIT 2 (Goblin Spearman) 29 36 () ( _ "Goblin Scout")}
442            {NAMED_NOTRAIT_UNIT 2 (Goblin Spearman) 33 34 () ( _ "Goblin Scout")}
443            {NAMED_NOTRAIT_UNIT 2 (Goblin Spearman) 31 31 () ( _ "Goblin Scout")}
444
445#endif
446
447#endif
448
449            [message]
450                speaker=Goblin Scout
451                message= _ "Attack!"
452            [/message]
453
454            [message]
455                speaker=Goblin Coward
456                message= _ "Run away!"
457            [/message]
458
459            [message]
460                speaker=Zhul
461                message= _ "Goblins are so predictable."
462            [/message]
463        [/event]
464    [/event]
465
466    # Event 2: naga appear around western guardpost
467
468    # when player approches western guardpost have a few goblins jump out of
469    # the eastern hills, and a naga or three appear in the lake
470
471    # Easy:
472    # 1 orcish assassin 23,33
473    # 3 naga fighters: 20,34 19,33 20,35
474    # 2 goblins spearmen: 23,32 24,32 24,33
475
476    # Medium: 1 orcish slayer, 2 goblin impalers, 1 naga warrior, 2 naga fighters
477    # Hard: 1 orcish slayer, 2 goblin impalers, 3 naga warriors
478
479#define NAGA_ATTACK
480
481    #1 orcish assassin/slayer summons/leads any goblins
482
483#ifdef EASY
484    {NAMED_NOTRAIT_UNIT 2 (Orcish Assassin) 24 32 (Orac) ( _ "Orac")}
485#else
486    {NAMED_NOTRAIT_UNIT 2 (Orcish Slayer) 24 32 (Orac) ( _ "Orac")}
487#endif
488
489    #2 nagas appear at edge of lake
490
491#ifdef EASY
492    {NAMED_NOTRAIT_UNIT 2 (Naga Fighter) 20 34 (Scylla) ( _ "Scylla")}
493#else
494    {NAMED_NOTRAIT_UNIT 2 (Naga Warrior) 20 34 (Scylla) ( _ "Scylla")}
495#endif
496    #hack to make Scylla female
497    [+unit]
498        gender=female
499    [/unit]
500
501#ifdef HARD
502    {NAMED_NOTRAIT_UNIT 2 (Naga Warrior) 19 34 () ( _ "Lake Naga")}
503    {NAMED_NOTRAIT_UNIT 2 (Naga Warrior) 20 35 () ( _ "Lake Naga")}
504#else
505    {NAMED_NOTRAIT_UNIT 2 (Naga Fighter) 19 34 () ( _ "Lake Naga")}
506    {NAMED_NOTRAIT_UNIT 2 (Naga Fighter) 20 35 () ( _ "Lake Naga")}
507#endif
508
509    [set_variable]
510        name=naga_ambush
511        value=1
512    [/set_variable]
513
514#enddef
515
516    [event]
517        name=moveto
518
519        [filter]
520            x=17-24
521            y=29-36
522            side=1
523        [/filter]
524
525        [filter_condition]
526            [variable]
527                name=naga_ambush
528                numerical_equals=0
529            [/variable]
530        [/filter_condition]
531
532        {NAGA_ATTACK}
533
534#ifdef EASY
535        {NAMED_NOTRAIT_UNIT 2 (Goblin Spearman) 24 31 () ( _ "Goblin Scout")}
536        {NAMED_NOTRAIT_UNIT 2 (Goblin Spearman) 25 33 () ( _ "Goblin Scout")}
537#else
538        {NAMED_NOTRAIT_UNIT 2 (Goblin Impaler) 24 31 () ( _ "Goblin Scout")}
539        {NAMED_NOTRAIT_UNIT 2 (Goblin Impaler) 25 33 () ( _ "Goblin Scout")}
540#endif
541
542        [message]
543            speaker=Orac
544            message= _ "Come forth, creatures of the lake! Fulfill the oaths you have made and help us drive these hated creatures from our lands."
545        [/message]
546
547        [message]
548            speaker=Scylla
549            message= _ "Sssslay them all! In the name of the Ssscaled One!" # wmllint: no spellcheck
550        [/message]
551    [/event]
552
553    #Event 3: The Goblin and The Ring (and maybe the Naga)
554
555    # When the elves fight Panok they notice how fast he is
556    [event]
557        name=attack
558
559        [filter]
560            side=1
561        [/filter]
562
563        [filter_second]
564            id=Panok
565        [/filter_second]
566
567        [message]
568            speaker=Panok
569            message= _ "These elves are stronger than we thought. Send for more reinforcements!"
570        [/message]
571
572        [message]
573            speaker=Kaleh
574            message= _ "How can he move that fast? He is faster than any goblin rider I have ever seen. It’s almost unnatural."
575        [/message]
576    [/event]
577
578    # When Panok dies player gets ring and naga ambush is triggered if it
579    # hasn't been already
580    [event]
581        name=last breath
582
583        [filter]
584            id=Panok
585        [/filter]
586
587        [message]
588            speaker=Panok
589            message= _ "Gaaghh!!" # wmllint: no spellcheck
590        [/message]
591
592        [kill]
593            id=Panok
594            animate=yes
595        [/kill]
596
597        {PLACE_IMAGE items/ring-silver.png $x1 $y1}
598
599        {CHECK_SPEAKER}
600        [message]
601            speaker=$speaking_unit.id
602            message= _ "Wait a minute. He was wearing a silver ring on one of his fingers. I think the ring might be magical. Maybe that’s why he was moving so fast."
603        [/message]
604        {CLEAR_VARIABLE speaking_unit}
605
606        # Commented out, since Kaleh has 6 MP now
607#ifdef __UNUSED__
608        [message]
609            speaker=Nym
610            message= _ "I think, Kaleh, that you should take the ring."
611        [/message]
612
613        [message]
614            speaker=Kaleh
615            message= _ "Why me?"
616        [/message]
617
618        [message]
619            speaker=Nym
620            message= _ "Because you tend to move slowly and if we’re going into the caves you’ll need all the speed you can get. And besides, we can’t afford to lose you; you never know when being able to run a bit faster might be the difference between life and death."
621        [/message]
622#endif
623
624        # Get Ring event
625        [event]
626            name=moveto
627            id=take_ring
628            delayed_variable_substitution=no
629            first_time_only=no
630
631            [filter]
632                x=$x1
633                y=$y1
634                side=1
635                [not]
636                    type=Dust Devil
637                [/not]
638            [/filter]
639
640            [message]
641                speaker=unit
642
643                message= _ "Should I take this ring?"
644                [option]
645                    label= _ "Yes, I’ll take it."
646
647                    [command]
648                        [object]
649                            id=SpeedyRing
650                            name= _ "Ring of Speed"
651                            image=items/ring-gold.png
652                            description= _ "This ring will increase your maximum speed by 1."
653                            [filter]
654                                x=$x1
655                                y=$y1
656                                side=1
657                            [/filter]
658
659                            [effect]
660                                apply_to=movement
661                                increase=1
662                            [/effect]
663                        [/object]
664
665                        [remove_item]
666                            x=$x1
667                            y=$y1
668                        [/remove_item]
669
670                        [remove_event]
671                            id=take_ring
672                        [/remove_event]
673                    [/command]
674                [/option]
675
676                [option]
677                    label= _ "No, I think someone else should wear it."
678
679                    [command]
680                        [allow_undo]
681                        [/allow_undo]
682                    [/command]
683                [/option]
684            [/message]
685        [/event]
686
687        #when Panok dies, if player hasn't triggered naga ambush, then units attack
688
689#ifndef EASY
690        [if]
691            [variable]
692                name=naga_ambush
693                numerical_equals=0
694            [/variable]
695
696            [then]
697                {NAGA_ATTACK}
698
699                [message]
700                    speaker=Orac
701                    message= _ "The elves have killed Panok the goblin! The other goblins may flee to the caves, but we will not give up these hills without a fight. Come forth, creatures of the lake! Fulfill the oaths you have made and help us drive these hated creatures from our lands."
702                [/message]
703
704                [message]
705                    speaker=Scylla
706                    message= _ "Sssslay them all! In the name of the Ssscaled One!" # wmllint: no spellcheck
707                [/message]
708            [/then]
709        [/if]
710#endif
711    [/event]
712
713    # Event 4: elvish unit afraid when entering underground tunnels
714    [event]
715        name=moveto
716
717        [filter]
718            [filter_location]
719                time_of_day_id=underground
720            [/filter_location]
721            side=1
722        [/filter]
723
724        [allow_undo]
725        [/allow_undo]
726
727        {CHECK_EXPLORER}
728        [message]
729            speaker=$explorer.id
730            message= _ "Ugh! These tunnels are pitch black! It’s as bad as fighting in a moonless night, and it stinks of orc filth. I can hardly think of a place I would less like to go into."
731        [/message]
732        {CLEAR_VARIABLE explorer}
733
734        [message]
735            speaker=Kaleh
736            message= _ "We have no choice. We cannot cross over these mountains, so we must go beneath them. If the orcs skulk in their tunnels and block our way, we must enter their dark places and fight them, no matter what the conditions."
737        [/message]
738
739        [message]
740            speaker=Zhul
741            # TODO: Could give more tips here
742            message= _ "Remember, Kaleh, it’s nasty fighting underground. We will be at a disadvantage against orcs and other things that prefer the darkness."
743        [/message]
744
745        [message]
746            speaker=Elyssa
747            message= _ "Also, any time you find a particularly tough orc blocking a passage, my fireballs can blast him quick enough."
748        [/message]
749    [/event]
750
751    # Event 5: Goblin guards a chest in NE corner of map
752
753    [event]
754        name=moveto
755
756        [filter]
757            x=31-37
758            y=6-9
759            side=1
760        [/filter]
761
762        {NAMED_NOTRAIT_UNIT 4 (Goblin Impaler) 35 7 (Greebo) ( _ "Greebo")}
763
764        {PLACE_IMAGE items/chest-plain-closed.png 35 6}
765
766        [message]
767            speaker=Greebo
768            # wmllint: local spelling shinies orcses
769            message= _ "Greebo keeps shinies safe from nasty orcses. And ’specially stinking elves."
770        [/message]
771    [/event]
772
773    # Chest contains gold for player
774
775    [event]
776        name=moveto
777
778        [filter]
779            x=35
780            y=6
781            side=1
782        [/filter]
783
784        {PLACE_IMAGE items/chest-plain-open.png 35 6}
785
786        [sound]
787            name=gold.ogg
788        [/sound]
789
790        {CHECK_EXPLORER}
791        [message]
792            speaker=$explorer.id
793            message= _ "Looks like he’s been squirreling away his stolen loot in this cave. Not that he had much. Must be hard times."
794        [/message]
795        {CLEAR_VARIABLE explorer}
796
797        [gold]
798            amount={ON_DIFFICULTY 80 60 40}
799            side=1
800        [/gold]
801    [/event]
802
803    #Event 6: Cold dagger
804
805    [event]
806        name=moveto
807        id=find_dagger
808        first_time_only=no
809
810        [filter]
811            x=12
812            y=16
813            side=1
814            [not]
815                type=Dust Devil
816            [/not]
817        [/filter]
818
819        [message]
820            speaker=unit
821            message= _ "How odd. Someone has carved a crude fountain out of the stone at the end of the passage. The freezing water pours out into a large pool. At the bottom of the pool I can see a skeleton still gripping a sword. The blade seems to glow faintly blue. The pool isn’t very deep, I could easily wade in and pick it up. But someone else has carved a crude message in the wall. <i>“If you dare to take this blade here, your greatest fear will surely appear.”</i> It looks like a nice sword, but do I dare chance it?"
822            [option]
823                label= _ "I fear no creature, I will take the blade!"
824                [command]
825                    [message]
826                        speaker=unit
827                        message= _ "The blade is chill to the touch and gives off a cold glow. I wonder how it came to be here."
828                    [/message]
829
830                    [object]
831                        [filter]
832                            x=12
833                            y=16
834                            side=1
835                        [/filter]
836
837                        id=ColdBlade
838                        name= _ "Cold Blade"
839                        description= _ "The unit who wields this blade will deal cold damage with its melee attack."
840
841                        [effect]
842                            apply_to=attack
843                            range=melee
844                            set_type=cold
845                        [/effect]
846                    [/object]
847
848                    {NAMED_NOTRAIT_UNIT 3 (Dawarf) 14 15 (Purple Abomination) ( _ "Purple Abomination")}
849
850                    [message]
851                        speaker=Purple Abomination
852                        message= _ "I am an abomination, please kill me."
853                    [/message]
854
855                    [message]
856                        speaker=unit
857                        message= _ "I’ve seen some ugly creatures in my day, but that thing is just wrong."
858                    [/message]
859
860                    [message]
861                        speaker=Purple Abomination
862                        message= _ "The voices say I have no choice, I must attack!"
863                    [/message]
864
865                    [remove_event]
866                        id=find_dagger
867                    [/remove_event]
868                [/command]
869            [/option]
870
871            [option]
872                label= _ "I don’t like the sound of this. I’m out of here."
873            [/option]
874        [/message]
875    [/event]
876
877    #Event 7: End of the River
878
879    [event]
880        name=moveto
881
882        # Dust devil is supposed to be mute. This isn't like the other cases,
883        # where Nym could plausibly speak the line, so we just don't trigger the event.
884        [filter]
885            x=3
886            y=10
887            side=1
888            [not]
889                type=Dust Devil
890            [/not]
891        [/filter]
892
893        [allow_undo]
894        [/allow_undo]
895
896        [message]
897            speaker=$unit.id
898            message= _ "This is the end of the line. The water is too deep for me to continue any further. I’m freezing cold, wet, and I can’t see a thing. I’m not exactly sure what I’m doing up here. Some strange influence made me want to come up here, but I don’t know what made me think it could be of any good."
899        [/message]
900    [/event]
901
902    # Event 8: Enter the Assassin/Cloaked Figure (same guy, two names)
903
904    # When Kaleh enters one of the caves, the cloaked figure pops up next turn
905    # and attacks in a dramatic manner
906
907    [event]
908        name=moveto
909
910        [filter]
911            id=Kaleh
912            [filter_location]
913                time_of_day_id=underground
914            [/filter_location]
915        [/filter]
916
917        [event]
918            # Find the location of Kaleh and then find an adjacent
919            # hex the cloaked figure can pop up in. (any hex that is not impassable)
920            name=new turn
921
922            [store_locations]
923                [filter]
924                    id=Kaleh
925                [/filter]
926
927                variable=dark_assassin_location
928            [/store_locations]
929
930            [unit]
931                type=Dark Assassin1
932                id=Cloaked Figure
933                name= _ "Cloaked Figure"
934                side=5
935                x,y=$dark_assassin_location.x,$dark_assassin_location.y
936                placement=map
937                passable=yes
938                [modifications]
939                    {TRAIT_INTELLIGENT}
940                    {TRAIT_RESILIENT}
941                [/modifications]
942            [/unit]
943            {CLEAR_VARIABLE dark_assassin_location}
944
945            [delay]
946                time=200
947            [/delay]
948
949            [message]
950                speaker=Cloaked Figure
951                image=portraits/cloaked.png
952                message= _ "Kaleh, I am death incarnate."
953            [/message]
954
955            [message]
956                speaker=Cloaked Figure
957                image=portraits/cloaked.png
958                message= _ "And I shall avenge all those you have killed!"
959            [/message]
960        [/event]
961    [/event]
962
963    # Death event for dark assassin
964
965    [event]
966        name=last breath
967
968        [filter]
969            id=Cloaked Figure
970        [/filter]
971
972        [message]
973            speaker=Cloaked Figure
974            message= _ "I promise we shall meet again."
975        [/message]
976
977        [kill]
978            id=Cloaked Figure
979            animate=no
980            fire_event=no
981        [/kill]
982
983        [message]
984            speaker=Kaleh
985            message= _ "He just disappeared. That’s odd."
986        [/message]
987    [/event]
988
989    #Event 10: victory if Kaleh moves to north edge of map
990
991    [event]
992        name=moveto
993
994        [filter]
995            y=1
996            side=1
997            id=Kaleh
998        [/filter]
999
1000        [endlevel]
1001            result=victory
1002            bonus=yes
1003            {NEW_GOLD_CARRYOVER 40}
1004        [/endlevel]
1005    [/event]
1006
1007    #victory event
1008    [event]
1009        name=victory
1010
1011        [message]
1012            speaker=Kaleh
1013            message= _ "This passage seems different from the other tunnels and caves. It is wide and smooth and leads sharply downwards. I bet this was the way that Eloh was talking about."
1014        [/message]
1015
1016        [message]
1017            speaker=Elyssa
1018            message= _ "This is no natural passage, and the walls are too well carved and smooth to be made by orcs. I wouldn’t be surprised if this was once carved out by dwarves. I wonder if there are any still left in these mountains..."
1019        [/message]
1020
1021        [if]
1022            [variable]
1023                name=leaders_killed
1024                numerical_equals=3
1025            [/variable]
1026
1027            [then]
1028                [message]
1029                    speaker=Zhul
1030                    message= _ "Having killed all the orc and goblin leaders in the immediate vicinity, we can take our time and should have no trouble bringing the rest of our people down this way. It’s odd, I guess we’re trading the dangers we know for the dangers we don’t. We really are putting our lives in Eloh’s palm; may she guide us as well as she has before."
1031                [/message]
1032            [/then]
1033
1034            [else]
1035                [message]
1036                    speaker=Zhul
1037                    message= _ "Now that you’ve found the way we should be able to get the rest of our people past the orcs. It’s odd, I guess we’re trading the dangers we know for the dangers we don’t. We really are putting our lives in Eloh’s palm, may she guide as well as she has before."
1038                [/message]
1039            [/else]
1040        [/if]
1041
1042        [message]
1043            speaker=Nym
1044            message= _ "I’ll just be happy when I can breathe fresh air again and see the suns and stars. Still, who knows what we’ll encounter deep under the earth?"
1045        [/message]
1046
1047        [message]
1048            speaker=Kaleh
1049            message= _ "Well, there’s only one way to find out."
1050        [/message]
1051
1052        {CLEAR_VARIABLE naga_ambush}
1053    [/event]
1054
1055    # if player runs out of time, display time over message
1056    [event]
1057        name=time over
1058        [message]
1059            speaker=Kaleh
1060            message= _ "We’ve taken too long to get our people into the tunnels! Even more orcs are coming across the foothills from the east and west and flanking us. There’s no way we can kill all these orcs and goblins. We’ll never make it to safety now."
1061        [/message]
1062    [/event]
1063
1064    {UTBS_INCLUDE utils/deaths.cfg}
1065[/scenario]
1066