#textdomain wesnoth-low
[scenario]
    id=11_Battle_of_the_book
    name= _ "Battle of the book"
    next_scenario=12_Revelations
    {LOW_MAP 11_Battle_of_the_book.map}
    {TURNS 30 34 38}
    {DEFAULT_SCHEDULE}

    {INTRO_AND_SCENARIO_MUSIC frantic.ogg the_dangerous_symphony.ogg}
    {EXTRA_SCENARIO_MUSIC battle.ogg}
    {EXTRA_SCENARIO_MUSIC nunc_dimittis.ogg}
    {EXTRA_SCENARIO_MUSIC suspense.ogg}

    [story]
        [part]
            show_title=yes
            delay=4000
            {TO_BATTLE_OF_THE_BOOK}
        [/part]
        [part]
            story= _ "Quickening their pace, Elves and Dwarves raced towards the smoke...."
            {TO_BATTLE_OF_THE_BOOK_BATTLE}
        [/part]
    [/story]

    #wmllint: validate-off
    [side]
        {KALENZ}
        # wmllint: recognize Kalenz
        recruit={ELVES},{DWARVES}
        fog=yes
    [/side]
    #wmllint: validate-on

    [side]
        type=Arch Mage
        id=Aquagar
        name=_ "Aquagar"
        side=2
        canrecruit=yes
        controller=ai
        {GOLD 230 290 320}
        recruit=Drake Warrior,Drake Burner,Drake Clasher,Drake Fighter, Drake Blademaster, Drake Enforcer, Fire Drake, Drake Flameheart, Drake Flare, Drake Gladiator, Sky Drake, Drake Slasher, Drake Warden, Drake Glider, Hurricane Drake, Inferno Drake
        team_name=drakes
        shroud=yes
    [/side]
    [side]
        type=Elder Mage
        id=Crelanu
        name=_ "Crelanu"
        profile="portraits/crelanu.png"
        side=3
        canrecruit=yes
        controller=ai
        {GOLD 80 80 80}
        recruit=Mage, Gryphon
        team_name=kalenz
    [/side]

    [side]
        type=Troll Warrior
        id=Trigrul
        name=_ "Trigrul"
        side=4
        canrecruit=yes
        controller=ai
#ifdef EASY
        recruit=Troll Rocklobber,Troll Whelp
#else
        recruit=Troll,Troll Rocklobber, Troll Warrior
#endif
        {INCOME 5 10 20}
        {GOLD 140 160 210}
        team_name=drakes
        shroud=yes
    [/side]

    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                description= _ "Defeat the drakes and trolls"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Kalenz"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Landar"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Olurf"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Cleodil"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Crelanu"
                condition=lose
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition=lose
            [/objective]
        [/objectives]

        {RECALL_LOYALS}
        # wmllint: recognize Landar
        [recall]
            id=Olurf
        [/recall]

        {CHECK_LANDAR}
        {CHECK_CLEODIL}
        {CHECK_OLURF}
    [/event]

    [event]
        name=start

        [message]
            id=Landar
            message= _ "Looks like your mage friend is in trouble. There is a horde of drakes attacking him!"
        [/message]
        [message]
            id=Kalenz
            message= _ "Indeed. Before he can aid us, we will have to aid him."
        [/message]
        [message]
            id=Aquagar
            message= _ "Fools! The book will be mine!"
        [/message]
    [/event]

    [event]
        name=die
        [filter]
            id=Aquagar
        [/filter]
        [message]
            speaker=unit
            # wmllint: local spelling Morogoth
            message= _ "I die, but I will not go unavenged! Cursed will you be Kalenz! You will never find lasting peace in all your years. You will lose your dearest. And you, Crelanu, your book will bring woe on you and haunt all its future owners to their graves! This will be the price for slaying me, Aquagar, great drake wizard of Morogoth."
        [/message]
        [if]
            [have_unit]
                id=Trigrul
            [/have_unit]
            [else]
                [message]
                    id=Olurf
                    message= _ "Some scary fellow this Aquagar thinks he is! Come now, I think Crelanu owes us some drinks."
                [/message]
            [/else]
        [/if]
    [/event]

    [event]
        name=last breath
        [filter]
            id=Crelanu
        [/filter]
        [message]
            id=Kalenz
            message= _ "There goes our last hope!"
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    {@campaigns/Legend_of_Wesmere/utils/deaths.cfg}
[/scenario]
