#textdomain wesnoth-thot
[scenario]
    name=_"Mages and Drakes"
    id=07_Mages_and_Drakes
    next_scenario=08_Fear
    victory_when_enemies_defeated=yes
    map_data="{campaigns/The_Hammer_of_Thursagan/maps/07_Mages_and_Drakes.map}"
    {DEFAULT_SCHEDULE}
    {TURNS 30 25 20}    # BALANCE

    {SCENARIO_MUSIC "revelation.ogg"}   # No story part
    {EXTRA_SCENARIO_MUSIC "traveling_minstrels.ogg"}
    {EXTRA_SCENARIO_MUSIC "nunc_dimittis.ogg"}

    {THOT_TRACK {JOURNEY_STAGE7}}

    [side]
        type="Dwarvish Fighter"
        id="Aiglondur"
        name=_"Aiglondur"
        canrecruit=yes
        side="1"
        controller="human"
        team_name="northern_alliance"
        user_team_name=_"Alliance"
        {FLAG_VARIANT knalgan}
        fog=no
        shroud=no
        recruit="Dwarvish Fighter,Dwarvish Thunderer,Dwarvish Guardsman, Dwarvish Scout"
        {GOLD 175 150 125}   # BALANCE
        {FLAG_VARIANT knalgan}
    [/side]

    [side]
        type=Great Mage
        id=Master Perrin
        # wmllint: directory spelling Perrin
        name= _ "Master Perrin"
        profile=portraits/perrin.png
        gender=male
        side=2
        canrecruit=yes
        team_name=northern_alliance
        user_team_name=_"Alliance"
        recruit=Mage
        {GOLD 140 120 100}  # BALANCE
        [ai]
            {ATTACK_DEPTH 1 3 5}
            passive_leader=yes
            recruitment_pattern=mixed fighter
        [/ai]
    [/side]

    {STARTING_VILLAGES 2 7}

    [side]
        type=Drake Flameheart
        id=Glashal
        name= _ "Glashal"
        side=3
        canrecruit=yes
        team_name=drakes
        user_team_name=_"Drakes"
        recruit=Drake Fighter,Drake Glider,Drake Burner,Drake Clasher
        {GOLD 120 140 160}  # BALANCE
        {INCOME 0 5 10}   # BALANCE
        [ai]
            {ATTACK_DEPTH 3 4 5}
            passive_leader=no
        [/ai]
    [/side]

    {campaigns/The_Hammer_of_Thursagan/utils/herodeaths.cfg}

    [event]
        name="prestart"

        [recall]
            id="Angarthing"
            x,y=8,17
        [/recall]

        [recall]
            id="Ratheln"
        [/recall]

        [unit]
            type=White Mage
            id="Preceptor"
            name=_ "Preceptor"
            side=2
            x,y=12,14
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_INTELLIGENT}
            [/modifications]
            {IS_LOYAL}
        [/unit]

        [unit]
            type=Red Mage
            id="Warder"
            name=_ "Warder"
            side=2
            x,y=14,14
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_STRONG}
            [/modifications]
            {IS_LOYAL}
        [/unit]

        [objectives]
            side="1"
            [objective]
                description=_"Defeat Glashal"
                condition="win"
            [/objective]
            [objective]
                description=_"Death of Aiglondur"
                condition="lose"
            [/objective]
            [objective]
                description=_"Death of Angarthing"
                condition="lose"
            [/objective]

            {TURNS_RUN_OUT}

            [gold_carryover]
                bonus=yes
                carryover_percentage=40
            [/gold_carryover]
        [/objectives]
    [/event]

    [event]
        name="start"
        [message]
            speaker="Preceptor"
            message=_"Master Perrin! A mage comes down from the High Pass, with a company of dwarves. They are well-armed, but not in battle array."
        [/message]
        [message]
            speaker="Master Perrin"
            message=_"That will be Ratheln, I expect. Hail! You on the road! Who comes bearing arms into our valley?"
        [/message]
        [message]
            speaker="Glashal"
            message=_"‘Our’ valley, says Master Perrin. The arrogance of these mages is intolerable!"
        [/message]
        [message]
            speaker="Aiglondur"
            message=_"A delegation of the Northern Alliance, traveling east. I believe we’ve found a friend of yours in the High Pass."
        [/message]
        [message]
            speaker="Master Perrin"
            message=_"Well met, then. But if you intend to travel east of here, beware of the nest of drakes in the cliffs near the valley’s end. They were here before us, and have become more hostile to travelers of late."
        [/message]
        [message]
            speaker="Glashal"
            message=_"The axe-bearers must not be let near our nestlings. Attack!"
        [/message]
    [/event]

    [event]
        name=enemies defeated
        first_time_only=yes

        [if]
            [have_unit]
                id="Master Perrin"
            [/have_unit]

            [then]
#ifdef EASY
                [message]
                    speaker="Master Perrin"
                    message=_"We’re grateful for your assistance. And I’d like to send a couple of our senior apprentices with you to the east. It has come time for them to be journeymen... and I sense something being born to the east that I do not like the feel of."
                [/message]
#else
                [message]
                    speaker="Master Perrin"
                    message=_"We’re grateful for your assistance. And I’d like to send one of our senior apprentices with you to the east. It has come time for him to be journeyman... and I sense something being born to the east that I do not like the feel of."
                [/message]
#endif

                [message]
                    speaker="Aiglondur"
                    message=_"What sort of thing?"
                [/message]

                [message]
                    speaker="Master Perrin"
                    message=_"There is some great magic brewing. Something... evil. I feel its traces in the currents of the earth and air."
                [/message]

#ifdef EASY
                [unit]
                    type=Mage
                    gender=female
                    id="Lorinne"
                    name=_ "Lorinne"
                    experience=40 # of 60
                    side=1
                [/unit]
#endif
                [unit]
                    type=Mage
                    id="Darchas"
                    name=_ "Darchas"
                    experience=40 # of 60
                    side=1
                [/unit]

#ifdef HARD
                [message]
                    speaker="Ratheln"
                    message=_"I would travel east with you if I could, but I have duties I must take up here."
                [/message]
                [message]
                    speaker="Aiglondur"
                    message=_"You have your duty, as we have ours. Fare well."
                [/message]
                [kill]
                    id="Ratheln"
                [/kill]
#else
                [message]
                    speaker="Ratheln"
                    message=_"Perrin, I owe these dwarves a debt; I think it is my duty to aid them in their journey. I’ll return with your apprentices as soon as I may."
                [/message]

                [message]
                    speaker="Master Perrin"
                    message=_"As you will. Go safely and return swiftly."
                [/message]
#endif
            [/then]
            [else]
                [message]
                    speaker="Ratheln"
                    message=_"I would travel east with you if I could, but the school will need me all the more with Master Perrin gone."
                [/message]
                [message]
                    speaker="Aiglondur"
                    message=_"You have your duty, as we have ours. Fare well."
                [/message]
                [message]
                    speaker="Angarthing"
                    message=_"I think we will regret Perrin’s passing. There is much he might have told us."
                [/message]
                [kill]
                    id="Ratheln"
                [/kill]
            [/else]
        [/if]
        [endlevel]
            result=victory
            bonus=yes
            {NEW_GOLD_CARRYOVER 40}
        [/endlevel]
    [/event]
[/scenario]
