#textdomain wesnoth-dm
[scenario]
    id=22_Face_of_the_Enemy
    name= _ "Face of the Enemy"
    {MEMOIRS_MAP 22_Face_of_the_Enemy.map}
    next_scenario=23_Epilogue
    {TURNS 28 26 24}
    {UNDERGROUND}

    {INTRO_AND_SCENARIO_MUSIC nunc_dimittis.ogg elvish-theme.ogg}
    {EXTRA_SCENARIO_MUSIC the_king_is_dead.ogg}
    {EXTRA_SCENARIO_MUSIC frantic.ogg}
    {EXTRA_SCENARIO_MUSIC the_city_falls.ogg}

    [load_resource]
        id=memoirs_elves_use_orcish_weapons
    [/load_resource]

    [story]
        [part]
            show_title=yes
        [/part]
        [part]
            story= _ "Delfador and the elves went through the secret door and found themselves in the dungeon, a veritable maze of narrow corridors."
        [/part]
    [/story]

    #wmllint: validate-off
    [side]
        side=1
        controller=human
        recruit={ELVES}
        {GOLD 180 160 140}
        fog=yes
        shroud=yes
        save_id=Player
        team_name=allies
        user_team_name= _ "Rebels"
        side_name= _ "Delfador"
        {FLAG_VARIANT long}
        [leader]
            {OLD_DELFADOR}
        [/leader]
        [unit]
            {KALENZ}
            placement=leader
        [/unit]
        [unit]
            {CHANTAL}
            placement=leader
        [/unit]
    [/side]

    [side]
        side=2
        controller=ai
#ifdef EASY
        recruit=Skeleton, Skeleton Archer, Vampire Bat, Ghost
#endif
#ifdef NORMAL
        recruit=Skeleton, Revenant, Skeleton Archer, Bone Shooter, Ghost, Vampire Bat, Blood Bat, Chocobone, Dark Adept
#endif
#ifdef HARD
        recruit=Skeleton, Skeleton Archer, Revenant, Draug, Banebow, Bone Shooter, Deathblade, Ghost, Wraith, Shadow, Chocobone, Dark Adept, Spectre, Nightgaunt
#endif
        {GOLD 120 150 180}
        {INCOME 2 4 6}
        team_name=enemies
        user_team_name= _ "Undead"
        {FLAG_VARIANT undead}
        # wmllint: who SAGUS is Sagus
        [leader]
            {SAGUS}
            facing=nw
        [/leader]
        [ai]
            recruitment_pattern=fighter,archer,scout
            aggression=1.0
            caution=0.0
            [goal]
                name=protect_unit
                [criteria]
                    side=2
                    canrecruit=yes
                [/criteria]
                value=3.0
            [/goal]
        [/ai]
    [/side]
    #wmllint: validate-on

    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                description= _ "Find the Book"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Delfador"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Kalenz"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Chantal"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}
            {IS_LAST_SCENARIO}
        [/objectives]
        {OBJ_POTION_HOLY_ALT 23 3 object7_holywater}
    [/event]

    [event]
        name=start

        {MODIFY_UNIT (side=1) facing sw}
        [message]
            speaker=Chantal
            message= _ "There is no doubt the Book is here; I can feel its presence."
        [/message]
        [message]
            speaker=Kalenz
            message= _ "This place stinks of evil and death. Chantal, do we have any holy water with us? I fear we may have need of it ere long."
        [/message]
        [message]
            speaker=Chantal
            message= _ "Only one bottle, Kalenz. Choose carefully who will take it."
        [/message]
    [/event]

    [event]
        name=sighted
        [filter]
            id=Sagus
        [/filter]
        [message]
            speaker="Sagus"
            message= _ "So, we meet again, Delfador! This time you will not steal what is mine!"
        [/message]
        [message]
            speaker=Delfador
            message= _ "Who are you, and what did I ever steal from you?"
        [/message]
        [message]
            speaker="Sagus"
            message= _ "I am the one whose place you took in the court of Wesnoth. But my daughter brought me what you seek, and I have gained its power."
        [/message]
        [message]
            speaker=Chantal
            message= _ "Asheviere is this thing’s daughter?"
        [/message]
        [message]
            speaker=Delfador
            message= _ "I fear so. This was the Arch-Mage Sagus. He was a good man when I knew him."
        [/message]
        [message]
            speaker=Delfador
            message= _ "Sagus... old friend... The Book you have taken is no good for you, your daughter, or the Kingdom. It will destroy you both!"
        [/message]
        [message]
            speaker="Sagus"
            message= _ "Same old Delfador, the arrogant, the overweening, always placing yourself above others. But I have become as great as you; I have mastered the Book! You always underestimated me, as Leollyn did before you. Now you will meet the same fate as he. Rise, my loyal soldiers!"
        [/message]
        [message]
            speaker=Delfador
            message= _ "I see that the Book has mastered you, and destroyed you. Farewell, Sagus. You were a good man, once."
        [/message]
        [message]
            speaker=Kalenz
            # wmllint: local spelling chokepoints
            message= _ "Prepare to fight! Block the chokepoints and hold them there!"
        [/message]
        [gold]
            side=2
            amount={ON_DIFFICULTY 180 200 220}
        [/gold]
        [objectives]
            side=1
            [objective]
                description= _ "Defeat Sagus"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Delfador"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Kalenz"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Chantal"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}
            {IS_LAST_SCENARIO}
        [/objectives]
    [/event]

    [event]
        name=die
        [filter]
            id="Sagus"
        [/filter]
        [message]
            speaker=Delfador
            message= _ "The Book is recovered, but the damage is done. Friends, thank you. Now let’s get out of here!"
        [/message]
        [endlevel]
            result=victory
            carryover_report=no
        [/endlevel]
    [/event]

    [event]
        name=time over
        [message]
            speaker=Kalenz
            message= _ "We are too late! Royal troops are coming! We are trapped!"
        [/message]
    [/event]

    {MEMOIRS_DEATHS}
    # wmllint: unwho SAGUS
    # wmllint: unwho KALENZ
    # wmllint: unwho CHANTAL
    # wmllint: unwho OLD_DELFADOR
[/scenario]
