#textdomain wesnoth-low

# To future editors: 'philter' is a real archaic word in English meaning a
# potion with magical effects. Do *not* change it to 'filter'!

### to do: make Landar disappear
[scenario]
    name= _ "News from the Front"
    id=13_News_from_the_Front

    random_start_time=no
    allow_new_game=yes
    new_game_title= _ "Chapter Four: The Alliance"
    force_lock_settings=yes

    {LOW_MAP 10_Cliffs_of_Thoria.map}
    turns=1
    next_scenario=14_Human_Alliance
    theme=Cutscene_Minimal

    {SCENARIO_MUSIC the_deep_path.ogg}

    {DEFAULT_SCHEDULE}

    [story]
        [part]
            story= _ "With Crelanu’s book in hand, Kalenz and his band began the long journey south to the Ka’lian..."
            {LOW_BIGMAP}
            {TREASURY_COMPLETE}
            {BOOK_COMPLETE}
            {ALLIANCE_STAGE1}
        [/part]
    [/story]

    [side]
        side=1
        fog=yes
        share_view=yes
        {PLAYABLE}
        save_id=Kalenz
        disallow_shuffle=yes
        {KALENZ}
        x=12
        y=1
#ifndef MULTIPLAYER
        [unit]
            {LANDAR}
            placement=leader
        [/unit]
        [unit]
            {CLEODIL}
            placement=leader
        [/unit]
        [unit]
            {OLURF}
            placement=leader
        [/unit]
#endif
    [/side]

#ifdef MULTIPLAYER
    [side]
        side=2
        no_leader=yes
        save_id=Landar
        disallow_shuffle=yes
        {PLAYABLE}
        [unit]
            {LANDAR}
            x=11
            y=1
        [/unit]
        fog=yes
    [/side]

    [side]
        side=3
        no_leader=yes
        save_id=Olurf
        disallow_shuffle=yes
        {PLAYABLE}
        [unit]
            {OLURF}
            x=11
            y=1
        [/unit]
        fog=yes
    [/side]

    [side]
        side=4
        no_leader=yes
        save_id=Cleodil
        disallow_shuffle=yes
        {PLAYABLE}
        [unit]
            {CLEODIL}
            x=11
            y=1
        [/unit]
        fog=yes
    [/side]
#endif

#define LEAVE_BEHIND_L3 NAME SIDE
    # these have been left behind to guard the Ka'lian
    [store_unit]
        variable=l3_store_{NAME}
        kill=yes
        [filter]
            side={SIDE}
            type=Elvish Marshal,Elvish Champion,Elvish Avenger,Elvish Sharpshooter
            [not]
                id=Kalenz
            [/not]
            [not]
                id=Anduilas
            [/not]
            [not]
                id=Arkildur
            [/not]
            [not]
                id=Landar
            [/not]
            [not]
                id=Cleodil
            [/not]
            [not]
                {FILTER_LOYALS}
            [/not]
        [/filter]
    [/store_unit]
#enddef

    [event]
        name=start

#ifdef MULTIPLAYER
        [persistent_carryover_unstore]
            scenario_id = LoW_Chapter_Three
        [/persistent_carryover_unstore]
        {LEAVE_BEHIND_L3 kalenz 1}
        {LEAVE_BEHIND_L3 landar 2}
#endif

        #TODO recall or create if not recallable

        {RECALL_LOYALS}

        [message]
            id=Landar
            message= _ "Oh, no, I forgot my dose of Crelanu’s invisibility philter. I’ll go back and get it. I’ll catch up with you later!"
        [/message]
        [message]
            id=Olurf
            message= _ "Maybe some of my dwarves can escort you..."
        [/message]
        [message]
            id=Kalenz
            message= _ "Go, Landar, but be careful. We need you."
        [/message]

        [store_unit]
            variable=landar_store
            kill=yes
            [filter]
                id=Landar
            [/filter]
        [/store_unit]

        [message]
            speaker=narrator
            image="wesnoth-icon.png"
            message= _ "Some weeks later, as Kalenz and his companions were working their way southwards from the high peaks of the Heart Mountains into its foothills..."
        [/message]

        [sound]
            name=horse-canter.wav
        [/sound]

        [move_unit_fake]
            type=Elvish Scout
            x=10,11,12,13,14,15
            y=9,8,7,6,5,4
        [/move_unit_fake]

        [unit]
            id=Eonihar
            name=_ "Eonihar"
            type=Elvish Scout
            side=1
            x=15
            y=4
            facing=sw
        [/unit]

        [message]
            id=Eonihar
            message= _ "At last I have found you, alive and well! We need you back at once! The orcs have attacked the humans."
        [/message]
        [message]
            id=Kalenz
            message= _ "This means we are safe for the time being, no?"
        [/message]
        [message]
            id=Eonihar
            message= _ "What’s more, King Haldric is dead. His successor wants to renew the treaty of alliance and has asked for our help."
        [/message]

        [unstore_unit]
            variable=landar_store
            find_vacant=yes
            x=10
            y=1
        [/unstore_unit]

        {CLEAR_VARIABLE landar_store}

        [move_unit]
            id=Landar
            to_x=14
            to_y=1
        [/move_unit]

        [message]
            id=Landar
            message= _ "How convenient! Now they need our help, they come running!"
        [/message]
        [message]
            id=Kalenz
            message= _ "Landar! You’re back! All is well?"
        [/message]
        [message]
            id=Landar
            message= _ "Yes, I have the philter of invisibility."
        [/message]
        [message]
            id=Kalenz
            message= _ "We face a difficult choice. I know humans did not help us when the orcs attacked, but the orcs are everybody’s enemy. When humans fall, we’ll be next."
        [/message]
        [message]
            id=Eonihar
            message= _ "The orcish forces are encamped south of the Great River, and have surrounded the fortified human settlement at Tath. The humans are sending all their forces there. We need to decide whether we will help them or not."
        [/message]
        [message]
            id=Kalenz
            message= _ "Go tell the council and the human king that we will be there! Now, let’s hurry!"
        [/message]
        [kill]
            id=Eonihar
        [/kill]
        [endlevel]
            result=victory
            bonus=no
            linger_mode=no
            carryover_report=no
            carryover_percentage=100
        [/endlevel]
    [/event]
[/scenario]
