1#textdomain wesnoth-low
2
3# NOTE: Orcish plans: The orcs are somewhat wary of the forest, and do
4# not want to commit their entire army from the start. So, they decide
5# to send a part of their army (under the command of the Orcish
6# Slayer Urudin), to test the defenses of Ka'lian. If the slayer dies (he's
7# not supposed to die, as he is not taking part in the battle, but
8# oversees it from a distance, and he'll flee if any orc dies), it
9# means that the orcs will not attempt further attack on
10# Ka'lian, but, instead, hold position and wait for their army to arrive
11
12[scenario]
13    id=03_Kalian_under_Attack
14    name= _ "Ka’lian under Attack"
15    next_scenario=04_The_Elvish_Treasury
16
17    allow_new_game=no
18    random_start_time=no
19    force_lock_settings=yes
20
21    experience_modifier=100
22
23    #### Map setup ####
24    {LOW_MAP  Kalian.map}
25
26    [event]
27        name=prestart
28
29        {campaigns/Legend_of_Wesmere/maps/Kalian_map.cfg}
30
31        [replace_map]
32            x=9-53
33            y=9-53
34            {LOW_MAP  Kalian.map}
35        [/replace_map]
36        [shift_labels]
37            x=-8
38            y=-9
39        [/shift_labels]
40    [/event]
41
42    {LOW_MASK 03_Kalian_under_Attack.mask (-7) (-7)}
43    #### /Map setup ####
44
45    {TURNS 5 7 9}
46
47    {INTRO_AND_SCENARIO_MUSIC elf-land.ogg revelation.ogg}
48    {EXTRA_SCENARIO_MUSIC into_the_shadows.ogg}
49    {EXTRA_SCENARIO_MUSIC the_deep_path.ogg}
50    {EXTRA_SCENARIO_MUSIC the_dangerous_symphony.ogg}
51    {EXTRA_SCENARIO_MUSIC northerners.ogg}
52
53    {DEFAULT_SCHEDULE}
54
55    [story]
56        [part]
57            story= _ "Events at the Ka’lian took an ominous turn before Kalenz and his band could arrive there..."
58            delay=4000
59        [/part]
60    [/story]
61    {LOW_TRACK {FLIGHT_STAGE3} }
62
63#define PLAYER_GOLD
64#ifndef MULTIPLAYER
65    {GOLD   300 240 200}
66    {INCOME  -2  -2 -2}
67#else
68    {GOLD    180 140 120}
69    {INCOME  -2  -2 -2}
70#endif
71    village_gold=1
72#enddef
73
74    [side]
75        side=1
76        no_leader=yes
77        {PLAYABLE}
78        save_id=Kalenz
79        disallow_shuffle=yes
80        fog=yes
81        {PLAYER_GOLD}
82    [/side]
83
84    # wmllint: skip-side
85    {MP_SIDE 2 (
86        no_leader=yes
87        {PLAYABLE}
88        save_id=Landar
89        disallow_shuffle=yes
90        fog=yes
91        {PLAYER_GOLD}
92    )}
93
94    [side]
95        side=3
96        {PLAYABLE}
97        fog=yes
98        no_leader=yes
99        previous_save_id=Kalenz
100        save_id=Galtrid
101        disallow_shuffle=yes
102#ifndef MULTIPLAYER
103        {GOLD   280 220 180}
104        {INCOME  -2  -2 -2}
105#else
106        {GOLD    160  120 100}
107        {INCOME  -2  -2 -2}
108#endif
109        income=-2
110        village_gold=1
111
112        [unit]
113            {GALTRID}
114            x=25
115            y=24
116            facing=nw
117        [/unit]
118#ifndef MULTIPLAYER
119        [unit]
120            {EL_ISOMITHIR}
121            x=21
122            y=24
123            facing=nw
124        [/unit]
125        [unit]
126            type=Elvish Scout
127            facing=nw
128            id=guard
129            x=22
130            y=21
131        [/unit]
132#endif
133        [unit]
134            type=Elvish Scout
135            [modifications]
136                {TRAIT_LOYAL}
137            [/modifications]
138            {IS_LOYAL}
139            facing=nw
140            id=guard2
141            x=24
142            y=21
143        [/unit]
144        # wmllint: recognize Eradion
145        # wmllint: recognize Galtrid
146    [/side]
147
148    # wmllint: skip-side
149    {MP_SIDE 4 (
150        no_leader=yes
151        previous_save_id=Landar
152        {PLAYABLE}
153        save_id=El_Isomithir
154        disallow_shuffle=yes
155        fog=yes
156        {GOLD    160  120 100}
157        {INCOME  -2  -2 -2}
158        income=-2
159        village_gold=1
160        [unit]
161            {EL_ISOMITHIR}
162            x=21
163            y=24
164        [/unit]
165        [unit]
166            type=Elvish Scout
167            x=22
168            y=21
169            [modifications]
170                {TRAIT_LOYAL}
171            [/modifications]
172            {IS_LOYAL}
173        [/unit]
174    )}
175
176    [side]
177        side=5
178        controller=ai
179        allow_player=no
180        {ORC_SETUP}
181        no_leader=yes
182        team_name=orcs
183        user_team_name= _ "Enemies"
184        fog=yes
185        shroud=yes
186        share_view=yes
187        gold=0
188        village_gold=1
189        recruit=""
190        faction=Custom
191        [ai]
192            [engine]
193                name=lua
194                code=<<
195                local my_ai = { }
196
197                function my_ai:retreat()
198                    local urudin = wesnoth.get_units({id="Urudin"})[1]
199                    if urudin and urudin.valid then
200                        local mhp, hp = urudin.max_hitpoints, urudin.hitpoints
201                        local turn = wesnoth.current.turn
202                        if turn >= 3 or hp < mhp / 2 then
203                            ai.move_full(urudin, 20, 6)
204                        end
205                    end
206                end
207
208                return my_ai
209            >>
210            [/engine]
211            [stage]
212                id=leader_retreat
213                engine=lua
214                name=leader_retreat
215                #retreat on > half HP lost  or turn>=3
216                code="(...):retreat()"
217            [/stage]
218            [stage]
219                name=ai_default_rca::candidate_action_evaluation_loop
220                id=simple_main_loop
221                {AI_CA_COMBAT}
222                {AI_CA_SIMPLE_MOVE_TO_TARGETS}
223            [/stage]
224        [/ai]
225    [/side]
226
227    {STARTING_VILLAGES_ALL 3}
228
229#ifdef MULTIPLAYER
230    [event]
231        name=prestart
232        [capture_village]
233            side=4
234            x=1-26
235            y=1-999
236        [/capture_village]
237    [/event]
238#endif
239
240    # wmllint: recognize Urudin
241    [event]
242        name=last breath
243        [filter]
244            id=Urudin
245        [/filter]
246        [message]
247            speaker=unit
248            message= _ "Chief, the cursed tree-shaggers are defeating us!"
249        [/message]
250        [fire_event]
251            name=orcs_select_strategy
252        [/fire_event]
253    [/event]
254
255    #### /Side3 code ####
256
257    #### Side6 code ####
258    [side]
259        side=6
260        controller=ai
261        allow_player=no
262        {ORC_SETUP}
263        no_leader=yes
264        team_name=orcs
265        user_team_name= _ "Enemies"
266        fog=yes
267        shroud=yes
268        share_view=yes
269#ifdef EASY
270        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Knight, Goblin Pillager, Goblin Spearman
271#endif
272#ifdef NORMAL
273        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Knight, Goblin Pillager, Goblin Spearman, Orcish Slayer, Orcish Warrior
274#endif
275#ifdef HARD
276        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Knight, Goblin Pillager, Goblin Spearman, Orcish Slayer, Orcish Warrior
277#endif
278        {GOLD 0 40 80}
279        {INCOME 4 8 12}
280        village_gold=1
281
282        [ai]
283            {AI_SIMPLE_NIGHT_ASPECT aggression 1}
284            {AI_SIMPLE_NIGHT_ASPECT caution 0}
285            {AI_SIMPLE_NIGHT_ASPECT grouping offensive}
286            {AI_SIMPLE_ALWAYS_ASPECT villages_per_scout 5}
287            {AI_SIMPLE_ALWAYS_ASPECT recruitment_pattern "scout,scout,scout,fighter,archer,mixed fighter"}
288            {MODIFY_AI_ADD_CANDIDATE_ACTION 4 main_loop {AI_CA_POISONING}}
289        [/ai]
290    [/side]
291    #### /Side4 code ####
292
293    #### Side5 code ####
294    [side]
295        side=7
296        controller=ai
297        allow_player=no
298        {ORC_SETUP}
299        no_leader=yes
300        team_name=orcs
301        user_team_name= _ "Enemies"
302        shroud=yes
303        fog=yes
304        share_view=yes
305#ifdef EASY
306        recruit=Orcish Crossbowman, Goblin Pillager, Goblin Knight
307#endif
308#ifdef NORMAL
309        recruit=Orcish Crossbowman, Goblin Pillager, Goblin Knight, Orcish Slayer, Goblin Impaler, Goblin Rouser, Orcish Warrior
310#endif
311#ifdef HARD
312        recruit=Orcish Crossbowman, Goblin Pillager, Goblin Knight, Orcish Slayer, Goblin Impaler, Goblin Rouser, Orcish Warrior
313#endif
314        {GOLD 0 40 80}
315        {INCOME 4 8 12}
316        village_gold=1
317
318        [ai]
319            {AI_SIMPLE_NIGHT_ASPECT aggression 1}
320            {AI_SIMPLE_NIGHT_ASPECT caution 0}
321            {AI_SIMPLE_NIGHT_ASPECT grouping offensive}
322            {AI_SIMPLE_ALWAYS_ASPECT villages_per_scout 5}
323            {AI_SIMPLE_ALWAYS_ASPECT recruitment_pattern "scout,fighter,fighter,archer,mixed fighter"}
324            {MODIFY_AI_ADD_CANDIDATE_ACTION 5 main_loop {AI_CA_POISONING}}
325        [/ai]
326    [/side]
327
328    # wmllint: recognize Mutaf-uru
329    [event]
330        name=last breath
331        [filter]
332            id=Mutaf-uru
333        [/filter]
334        [message]
335            speaker=unit
336            message= _ "We die, but more come after us, Orcs will rule all!"
337        [/message]
338    [/event]
339    #### /Side5 code ####
340
341#undef PLAYER_GOLD
342
343    #### Orc AI ####
344
345#define ORC_BATTLEFIELD_EVALUATION
346    {VARIABLE orc_battlefield_evaluation 0}
347    # slayer dead: -1000
348    [if]
349        [not]
350            [have_unit]
351                id=Urudin
352                side=5
353            [/have_unit]
354        [/not]
355        [then]
356            {VARIABLE_OP orc_battlefield_evaluation sub 1000}
357        [/then]
358    [/if]
359
360    # orcs in Ka'lian: +3 +4 +5 per orc
361    [store_unit]
362        variable=eval_orcs_in_kalian
363        [filter]
364            side=5,6,7
365            [filter_location]
366                [and]
367                    x,y=23,23
368                    radius=5
369                [/and]
370                [not]
371                    terrain=W*
372                [/not]
373            [/filter_location]
374        [/filter]
375    [/store_unit]
376
377    {VARIABLE eval_orcs_in_kalian_score 0}
378    {VARIABLE_OP eval_orcs_in_kalian_score add $eval_orcs_in_kalian.length}
379
380#ifdef EASY
381    {VARIABLE_OP eval_orcs_in_kalian_score multiply 3}
382#endif
383#ifdef NORMAL
384    {VARIABLE_OP eval_orcs_in_kalian_score multiply 4}
385#endif
386#ifdef HARD
387    {VARIABLE_OP eval_orcs_in_kalian_score multiply 5}
388#endif
389
390    {VARIABLE_OP orc_battlefield_evaluation add $eval_orcs_in_kalian_score}
391
392    # elven units: -1 per unit
393    [store_unit]
394        variable=eval_elves
395        [filter]
396            side=1,2,3,4
397        [/filter]
398    [/store_unit]
399
400    {VARIABLE_OP orc_battlefield_evaluation sub $eval_elves.length}
401    {CLEAR_VARIABLE eval_elves}
402    {CLEAR_VARIABLE eval_orcs_in_kalian}
403    {CLEAR_VARIABLE eval_orcs_in_kalian_score}
404#enddef
405
406#define ORC_BATTLEFIELD_EVALUATION_SUCCESS
407    [variable]
408        name=orc_battlefield_evaluation
409        greater_than_equal_to=11
410    [/variable]
411#enddef
412
413#define ORC_BATTLEFIELD_EVALUATION_FAILURE
414    [variable]
415        name=orc_battlefield_evaluation
416        less_than_equal_to=-25
417    [/variable]
418#enddef
419
420    [event]
421        name=prestart
422        {VARIABLE orc_reserve_used no}
423        {VARIABLE orc_battlefield_strategy 'wait'}
424        [unit]
425            type="Orcish Slayer"
426            id=Urudin
427            name= _ "Urudin"
428            side=5
429            canrecruit=yes
430            x=20
431            y=10
432            hitpoints=45
433            max_hitpoints=45
434        [/unit]
435        [unit]
436            type=Orcish Warlord
437            id=Murudin
438            name= _ "Murudin"
439            side=6
440            canrecruit=yes
441            x=3
442            y=12
443        [/unit]
444        [unit]
445            type=Orcish Warlord
446            id=Mutaf-uru
447            name= _ "Mutaf-uru"
448            profile=portraits/orcs/grunt-2.png
449            side=7
450            canrecruit=yes
451            x=9
452            y=4
453        [/unit]
454    [/event]
455
456    [event]
457        name=moveto
458        [filter]
459            x=12
460            y=4
461            id=Urudin
462        [/filter]
463        [if]
464            [variable]
465                name=orc_reserve_used
466                boolean_equals=no
467            [/variable]
468            [then]
469                {CLEAR_FOG 1 7 3 4}
470                {CLEAR_FOG 2 7 3 4}
471                {CLEAR_FOG 3 7 3 4}
472                {CLEAR_FOG 4 7 3 4}
473                [message]
474                    id=Mutaf-uru
475                    message=_ "Good, you are returned. What news is there?"
476                [/message]
477                [message]
478                    id=Urudin
479                    message=_ "The elvish scum refused to surrender, Warlord. We have begun the attack, as planned."
480                [/message]
481                [message]
482                    id=Mutaf-uru
483                    message=_ "Were you able to breach their citadel?"
484                [/message]
485                {ORC_BATTLEFIELD_EVALUATION}
486                [if]
487                    {ORC_BATTLEFIELD_EVALUATION_SUCCESS}
488                    [then]
489                        [message]
490                            id=Urudin
491                            message=_ "Yes. We slaughtered them in great numbers."
492                        [/message]
493                    [/then]
494                    [else]
495                        [if]
496                            {ORC_BATTLEFIELD_EVALUATION_FAILURE}
497                            [then]
498                                [message]
499                                    id=Urudin
500                                    message=_ "No, our attack was repulsed."
501                                [/message]
502                            [/then]
503                            [else]
504                                [message]
505                                    id=Urudin
506                                    message=_ "They resisted us fiercely; the battle is not yet done."
507                                [/message]
508                            [/else]
509                        [/if]
510                    [/else]
511                [/if]
512                {CLEAR_VARIABLE orc_battlefield_evaluation}
513                [fire_event]
514                    name=orcs_select_strategy
515                [/fire_event]
516                {UNCLEAR_FOG}
517            [/then]
518        [/if]
519        [message]
520            id=Mutaf-uru
521            # Grubr is from LoW #7
522            message=_ "Go, report this news to the warlord Grubr."
523        [/message]
524        [message]
525            id=Urudin
526            message=_ "I obey."
527        [/message]
528        [kill]
529            id=Urudin
530        [/kill]
531    [/event]
532
533    # triggered by slayer dying, or slayer reaching his boss, or Kalenz arriving
534    [event]
535        name=orcs_select_strategy
536        first_time_only=no
537
538        [if]
539            [variable]
540                name=orc_reserve_used
541                boolean_equals=no
542            [/variable]
543            [then]
544                # evaluate the battlefield. TODO Crab : consider using fai for evaluation
545                {ORC_BATTLEFIELD_EVALUATION}
546
547                [if]
548                    {ORC_BATTLEFIELD_EVALUATION_SUCCESS}
549                    [then]
550                        {VARIABLE orc_battlefield_strategy 'attack'}
551                    [/then]
552                [/if]
553
554                [if]
555                    {ORC_BATTLEFIELD_EVALUATION_FAILURE}
556                    [then]
557                        {VARIABLE orc_battlefield_strategy 'defend'}
558                    [/then]
559                [/if]
560                {CLEAR_VARIABLE orc_battlefield_evaluation}
561
562                # if fog is gone (thus, Kalenz is here), then do not wait
563                [if]
564                    # wmllint: recognize Kalenz
565                    [have_unit]
566                        id=Kalenz
567                        side=1
568                    [/have_unit]
569                    [variable]
570                        name=orc_battlefield_strategy
571                        equals='wait'
572                    [/variable]
573                    [then]
574                        #{DEBUG_MSG ("$orc_battlefield_strategy changed to ‘attack’")}
575                        {VARIABLE orc_battlefield_strategy 'attack'}
576                    [/then]
577                [/if]
578
579                [switch]
580                    variable=orc_battlefield_strategy
581                    [case]
582                        value='wait'
583                        # do nothing
584                    [/case]
585                    [case]
586                        value='attack'
587                        {CLEAR_FOG 1 7 3 4}
588                        [fire_event]
589                            name=orc_commit_reserves
590                        [/fire_event]
591                        [fire_event]
592                            name=orc_attack
593                        [/fire_event]
594                        {UNCLEAR_FOG}
595                    [/case]
596                    [case]
597                        value='defend'
598                        {CLEAR_FOG 1 7 3 4}
599                        [fire_event]
600                            name=orc_commit_reserves
601                        [/fire_event]
602                        [fire_event]
603                            name=orc_defend
604                        [/fire_event]
605                        {UNCLEAR_FOG}
606                    [/case]
607                [/switch]
608            [/then]
609        [/if]
610    [/event]
611
612    [event]
613        name=orc_commit_reserves
614        first_time_only=yes
615        {VARIABLE orc_reserve_used yes}
616        [modify_side]
617            side=6
618            {GOLD 200 320 420}
619        [/modify_side]
620        [modify_side]
621            side=7
622            {GOLD 200 240 380}
623        [/modify_side]
624    [/event]
625    [event]
626        name=orc_attack
627        first_time_only=no
628        [message]
629            id=Mutaf-uru
630            message= _ "These elves are weak, mere meat for my wolves! Get them!"
631        [/message]
632        {MODIFY_AI_ADD_GOAL 6 (
633            [goal]
634                [criteria]
635                    race=elf
636                [/criteria]
637                value=2
638            [/goal]
639        )}
640        {MODIFY_AI_ADD_GOAL 7 (
641            [goal]
642                [criteria]
643                    race=elf
644                [/criteria]
645                value=2
646            [/goal]
647        )}
648    [/event]
649
650    [event]
651        name=orc_defend
652        first_time_only=no
653        [message]
654            id=Mutaf-uru
655            message= _ "Cursed tree-shaggers and their filthy bows! We shall await the main army."
656        [/message]
657        {MODIFY_AI_ADD_SIMPLE_ALWAYS_ASPECT 6 aggression 0.3}
658        {MODIFY_AI_ADD_SIMPLE_ALWAYS_ASPECT 7 aggression 0.3}
659        {MODIFY_AI_ADD_SIMPLE_ALWAYS_ASPECT 6 caution 0.4}
660        {MODIFY_AI_ADD_SIMPLE_ALWAYS_ASPECT 7 caution 0.4}
661        {MODIFY_AI_ADD_GOAL 4 (
662            [goal]
663                [criteria]
664                    id=Mutaf-uru
665                [/criteria]
666                value=200
667            [/goal]
668        )}
669        {MODIFY_AI_ADD_GOAL 7 (
670            [goal]
671                [criteria]
672                    id=Mutaf-uru
673                [/criteria]
674                value=200
675            [/goal]
676        )}
677    [/event]
678
679    #### /Orc AI ####
680
681    #### Kalenz arrives ####
682
683    [event]
684        name=time over
685        [fire_event]
686            name=kalenz_arrives
687        [/fire_event]
688    [/event]
689
690    [event]
691        name=kalenz_arrives
692
693        {LOAD_SUBMAP 7-56 7-56 2 2 Kalian.map}
694        {LOW_MASK_IN_EVENT 03_Kalian_under_Attack.mask (-5) (-5)}
695
696        #redestroy the village destroyed by Urudrin
697        [terrain]
698            terrain = Rp^Dr
699            x,y=23,17
700        [/terrain]
701        [redraw]
702        [/redraw]
703
704        {REPLACE_SCENARIO_MUSIC the_city_falls.ogg}
705        {APPEND_MUSIC wanderer.ogg}
706        {APPEND_MUSIC suspense.ogg}
707        {APPEND_MUSIC siege_of_laurelmor.ogg}
708        {APPEND_MUSIC silvan_sanctuary.ogg}
709
710        [modify_turns]
711#ifdef EASY
712            add=35
713#endif
714#ifdef NORMAL
715            add=30
716#endif
717#ifdef HARD
718            add=25
719#endif
720        [/modify_turns]
721
722        [unit]
723            {KALENZ_YOUNG}
724            side=1
725            x=49
726            y=32
727        [/unit]
728        [unit]
729            {LANDAR_YOUNG}
730#ifndef MULTIPLAYER
731            side=1
732#else
733            side=2
734#endif
735            x=49
736            y=36
737        [/unit]
738        [recall]
739            id=Anduilas
740            side=1
741            x=49
742            y=33
743        [/recall]
744        [recall]
745            id=Arkildur
746#ifndef MULTIPLAYER
747            side=1
748#else
749            side=2
750#endif
751            x=49
752            y=37
753        [/recall]
754
755        [modify_side]
756            side=1
757            fog=no
758        [/modify_side]
759        [modify_side]
760            side=3
761            fog=no
762        [/modify_side]
763        [modify_side]
764            side=5
765            fog=no
766        [/modify_side]
767        [modify_side]
768            side=6
769            fog=no
770        [/modify_side]
771        [modify_side]
772            side=7
773            fog=no
774        [/modify_side]
775#ifdef MULTIPLAYER
776        [modify_side]
777            side=2
778            fog=no
779        [/modify_side]
780        [modify_side]
781            side=4
782            fog=no
783        [/modify_side]
784#endif
785    [/event]
786
787    [event]
788        name=time over
789
790        [objectives]
791            side=0
792            [objective]
793                description= _ "Defeat all enemy leaders."
794                condition=win
795            [/objective]
796            [objective]
797                description= _ "Death of Kalenz"
798                condition=lose
799            [/objective]
800            [objective]
801                description= _ "Death of Landar"
802                condition=lose
803            [/objective]
804            [objective]
805                description= _ "Death of Galtrid"
806                condition=lose
807            [/objective]
808#ifdef MULTIPLAYER
809            [objective]
810                description= _ "Death of Eradion"
811                condition=lose
812            [/objective]
813#endif
814
815            [gold_carryover]
816                bonus=yes
817                carryover_percentage=40
818            [/gold_carryover]
819            {TURNS_RUN_OUT}
820        [/objectives]
821
822        [redraw]
823        [/redraw]
824
825        [scroll_to_unit]
826            id=Kalenz
827        [/scroll_to_unit]
828
829        [message]
830            speaker=narrator
831            image=wesnoth-icon.png
832            message= _ "For days, Kalenz and his small host of followers traveled, moving nearer and yet nearer to the Ka’lian. Thanks to the dense fog and elvish woodscraft, the band was able to evade the orcish hunters. Then, as they were almost arrived at their destination, the north wind blew, and the fog lifted to reveal a grim sight..."
833        [/message]
834        [message]
835            id=Kalenz
836            message= _ "Great hosts of orcs converge on the Ka’lian! But if we fall upon them from behind as they are fully engaged with the defenders, we and they together might yet defeat them."
837        [/message]
838        [message]
839            id=Galtrid
840            message= _ "Are you our army’s vanguard? Hurry, for we are sorely pressed here."
841        [/message]
842        [message]
843            id=Kalenz
844            message= _ "No, we are fleeing an attack on our home in the Lintanir. Time enough for talk later; we must defeat these orcs together, or at least hold them off long enough for the humans to come to our aid."
845        [/message]
846        [message]
847            id=Galtrid
848            message= _ "Then you have not heard the ill tidings. King Haldric has broken the treaty. The humans will not come to our aid!"
849        [/message]
850        [message]
851            id=Landar
852            message= _ "How dare they break the treaty!"
853        [/message]
854
855        [fire_event]
856            name=orcs_select_strategy
857        [/fire_event]
858
859        [event]
860            name="time over"
861            [message]
862                id=Kalenz
863                message= _ "We have failed to relieve the defenders, and more orcish war-bands are arriving. All is lost!"
864            [/message]
865        [/event]
866    [/event]
867
868    [event]
869        name=prestart
870        [objectives]
871            [objective]
872                description= _ "Hold on until turns run out."
873                condition=win
874                show_turn_counter=yes
875            [/objective]
876            [objective]
877                description= _ "Death of Galtrid"
878                condition=lose
879            [/objective]
880#ifdef MULTIPLAYER
881            [objective]
882                description= _ "Death of Eradion"
883                condition=lose
884            [/objective]
885#endif
886            #TODO
887            #  [objective]
888            #      {BONUS_OBJECTIVE_CAPTION}
889            #      description= _ "Defeat Urudin"
890            #      #condition=win
891            #  [/objective]
892        [/objectives]
893    [/event]
894
895    [event]
896        name=start
897        [scroll_to]
898            x,y=23,24
899        [/scroll_to]
900        [delay]
901            time=5000 #this delay is to give the player the sightseening opportunity
902        [/delay]
903        [scroll_to_unit]
904            id=Urudin
905        [/scroll_to_unit]
906        {MOVE_UNIT (id=Urudin) 21 13}
907        [message]
908            id=guard
909            message= _ "Hist! Someone is sneaking about in the mist."
910        [/message]
911        [message]
912            id=Urudin
913            message= _ "Ho, elves! Hand over the stone and we <i>might</i> not destroy your cute little playhouse, and we <i>might</i> spare you. Or, at the very least, we promise you a quick and painless death."
914        [/message]
915        [message]
916            id=Galtrid
917            message= _ "What ‘stone’, foul and clumsy orc? Your lips are not fit even to name the citadel of the Ka’lian, for it has stood since before your kind crawled into sunlight and will endure long after you are forgotten!"
918        [/message]
919
920        {MOVE_UNIT (id=Urudin) 21 15}
921        [terrain]
922            terrain = Rp^Dr
923            x,y=21,15
924        [/terrain]
925        #TODO add village destroying sound effect
926        [redraw]
927        [/redraw]
928        {MOVE_UNIT (id=Urudin) 20 14}
929        [message]
930            id=Urudin
931            message= _ "We will cram those arrogant words back down your throat before we kill you, wose-spawned worm of an elf!"
932        [/message]
933
934        {REPLACE_SCENARIO_MUSIC the_deep_path.ogg}
935        {APPEND_MUSIC siege_of_laurelmor.ogg}
936        #TODO add one more title
937
938        {GENERIC_UNIT 7 "Orcish Assassin" 17 17}
939        {MOVE_UNIT (x,y=17,17) 19 19}
940
941        {GENERIC_UNIT 7 "Orcish Assassin" 17 16}
942        {MOVE_UNIT (x,y=17,16) 21 17}
943
944        {GENERIC_UNIT 6 "Orcish Assassin" 13 19}
945        {MOVE_UNIT (x,y=13,19) 16 20}
946
947        {GENERIC_UNIT 6 "Orcish Assassin" 11 21}
948        {MOVE_UNIT (x,y=11,21) 16 21}
949
950        {GENERIC_UNIT 6 "Orcish Assassin" 12 22}
951        {MOVE_UNIT (x,y=12,22) 15 23}
952
953        {GENERIC_UNIT 6 "Orcish Assassin" 12 24}
954        {MOVE_UNIT (x,y=12,24) 16 24}
955
956        {GENERIC_UNIT 6 "Orcish Assassin" 13 30}
957        {MOVE_UNIT (x,y=13,30) 17 29}
958
959        {GENERIC_UNIT 6 "Orcish Assassin" 20 32}
960        {MOVE_UNIT (x,y=20,32) 22 29}
961
962        {GENERIC_UNIT 6 "Orcish Assassin" 27 32}
963        {MOVE_UNIT (x,y=27,32) 24 29}
964
965        {GENERIC_UNIT 6 "Orcish Assassin" 26 32}
966        {MOVE_UNIT (x,y=26,32) 24 30}
967
968        {GENERIC_UNIT 7 "Orcish Assassin" 30 17}
969        {MOVE_UNIT (x,y=30,17) 28 19}
970
971        {GENERIC_UNIT 7 "Orcish Assassin" 33 20}
972        {MOVE_UNIT (x,y=33,20) 30 21}
973
974        {GENERIC_UNIT 7 "Orcish Assassin" 33 21}
975        {MOVE_UNIT (x,y=33,21) 31 23}
976
977        {GENERIC_UNIT 7 "Orcish Assassin" 34 24}
978        {MOVE_UNIT (x,y=34,24) 30 24}
979
980        [message]
981            id=Galtrid
982            message= _ "To arms, elven-kin! They are many, but our army is returning and surely close at hand. We have but to hold until it arrives!"
983        [/message]
984        [scroll_to]
985            x,y=21,22
986        [/scroll_to]
987
988        #Soldiers
989        {UNIT 3 "Elvish Archer"  24 19 (facing=ne
990        animate=yes)}
991        {UNIT 3 "Elvish Archer"  26 21 (facing=ne
992        animate=yes)}
993        {UNIT 3 "Elvish Fighter" 27 23 (facing=ne
994        animate=yes)}
995        {UNIT 3 "Elvish Archer"  27 25 (facing=se
996        animate=yes)}
997
998        {UNIT 3 "Elvish Fighter" 24 26 (facing=sw
999        animate=yes)}
1000        {UNIT 3 "Elvish Archer"  25 27 (facing=se
1001        animate=yes)}
1002
1003#ifndef MULTIPLAYER
1004        {UNIT 3 "Elvish Archer"  22 19 (facing=nw
1005        animate=yes)}
1006        {UNIT 3 "Elvish Archer"  20 21 (facing=nw
1007        animate=yes)}
1008        {UNIT 3 "Elvish Fighter" 19 23 (facing=nw
1009        animate=yes)}
1010        {UNIT 3 "Elvish Archer"  19 25 (facing=sw
1011        animate=yes)}
1012
1013        {UNIT 3 "Elvish Fighter" 22 26 (facing=se
1014        animate=yes)}
1015        {UNIT 3 "Elvish Archer"  21 27 (facing=sw
1016        animate=yes)}
1017#else
1018        {UNIT 4 "Elvish Archer"  22 19 (facing=nw
1019        animate=yes)}
1020        {UNIT 4 "Elvish Archer"  20 21 (facing=nw
1021        animate=yes)}
1022        {UNIT 4 "Elvish Fighter" 19 23 (facing=nw
1023        animate=yes)}
1024        {UNIT 4 "Elvish Archer"  19 25 (facing=sw
1025        animate=yes)}
1026
1027        {UNIT 4 "Elvish Fighter" 22 26 (facing=se
1028        animate=yes)}
1029        {UNIT 4 "Elvish Archer"  21 27 (facing=sw
1030        animate=yes)}
1031
1032#endif
1033        #village grabbers
1034        {GENERIC_UNIT 7 "Wolf Rider" 17 11}
1035        {GENERIC_UNIT 6 "Wolf Rider" 5 14}
1036
1037        #spotter
1038        {GENERIC_UNIT 7 "Wolf Rider" 12 7}
1039        {GENERIC_UNIT 6 "Wolf Rider" 8 14}
1040
1041        #second wave - north
1042        {GENERIC_UNIT 5 "Orcish Archer" 18 11}
1043        {GENERIC_UNIT 5 "Orcish Grunt" 19 11}
1044        {GENERIC_UNIT 5 "Orcish Grunt" 21 11}
1045        {GENERIC_UNIT 5 "Orcish Archer" 22 11}
1046
1047        #second wave - east
1048        {GENERIC_UNIT 5 "Orcish Archer" 33 19}
1049        {GENERIC_UNIT 5 "Orcish Grunt" 34 20}
1050        {GENERIC_UNIT 5 "Orcish Grunt" 35 23}
1051        {GENERIC_UNIT 5 "Orcish Archer" 35 24}
1052
1053        #second wave - west
1054        {GENERIC_UNIT 5 "Orcish Archer" 11 21}
1055        {GENERIC_UNIT 5 "Orcish Grunt" 11 23}
1056        {GENERIC_UNIT 5 "Orcish Grunt" 11 24}
1057        {GENERIC_UNIT 5 "Orcish Archer" 11 25}
1058
1059        #second wave - south
1060        {GENERIC_UNIT 5 "Orcish Archer" 21 36}
1061        {GENERIC_UNIT 5 "Orcish Grunt" 22 35}
1062        {GENERIC_UNIT 5 "Orcish Grunt" 24 35}
1063        {GENERIC_UNIT 5 "Orcish Archer" 25 36}
1064
1065        [message]
1066            speaker=narrator
1067            message= _ "You will have a different recall list and amount of starting gold than you may be expecting at the beginning of this scenario, as you will not start with Kalenz’s army."
1068            image=wesnoth-icon.png
1069        [/message]
1070    [/event]
1071    [event]
1072        name=scenario_end
1073        [filter_condition]
1074            [proceed_to_next_scenario]
1075            [/proceed_to_next_scenario]
1076        [/filter_condition]
1077
1078        [fire_event]
1079            name=kalenz_arrives
1080        [/fire_event]
1081
1082        [message]
1083            id=Kalenz
1084            message= _ "We won! The Ka’lian is safe!"
1085        [/message]
1086
1087        [sound]
1088            name=horse-canter.wav
1089        [/sound]
1090
1091        [move_unit_fake]
1092            type=Elvish Scout
1093            x=50,43,34,24
1094            y=15,15,12,18
1095        [/move_unit_fake]
1096
1097        [unit]
1098            #wmllint: who {HURALDUR} is Huraldur
1099            {HURALDUR}
1100            side=1
1101            x=24
1102            y=18
1103            facing=se
1104        [/unit]
1105
1106        [move_unit_fake]
1107            type=Elvish Scout
1108            x=50,43,34,26
1109            y=15,15,12,18
1110        [/move_unit_fake]
1111
1112        [unit]
1113            {SCOUT}
1114#ifdef MULTIPLAYER
1115            side=2
1116#else
1117            side=1
1118#endif
1119            x=26
1120            y=18
1121            facing=sw
1122        [/unit]
1123
1124        [message]
1125            id=Huraldur
1126            message= _ "The elvish treasury is under attack! They need help desperately!"
1127        [/message]
1128        [message]
1129            id=Kalenz
1130            message= _ "Galtrid, your men are weary from long combat. Mine are fresher; I’ll go."
1131        [/message]
1132        [message]
1133            id=Huraldur
1134            message= _ "Hurry! We were near overwhelmed as I left."
1135        [/message]
1136        [message]
1137            id=Galtrid
1138            message= _ "Yes, go, Kalenz, I’ll guard the Ka’lian till our army returns from the front."
1139        [/message]
1140    [/event]
1141
1142    [event]
1143        name=scenario_end
1144        [filter_condition]
1145            [proceed_to_next_scenario]
1146            [/proceed_to_next_scenario]
1147        [/filter_condition]
1148        {CLEAR_VARIABLE orc_reserve_used}
1149        {CLEAR_VARIABLE orc_battlefield_strategy}
1150
1151#ifdef MULTIPLAYER
1152        [persistent_carryover_store]
1153            scenario_id = LoW_Chapter_One
1154        [/persistent_carryover_store]
1155#endif
1156    [/event]
1157    {DEFAULT_VICTORY 0.5}
1158
1159    {campaigns/Legend_of_Wesmere/utils/deaths.cfg}
1160[/scenario]
1161
1162#undef ORC_BATTLEFIELD_EVALUATION
1163#undef ORC_BATTLEFIELD_EVALUATION_SUCCESS
1164#undef ORC_BATTLEFIELD_EVALUATION_FAILURE
1165# wmllint: unwho KALENZ_YOUNG
1166# wmllint: unwho LANDAR_YOUNG
1167