#textdomain wesnoth-ei
[scenario]
    id=Ogre
    name= _ "Training the Ogres"
    next_scenario=Xenophobia
    map_data="{campaigns/Eastern_Invasion/maps/Training_the_Ogres.map}"
    victory_when_enemies_defeated=no
    {TURNS 4 5 6}
    {DEFAULT_SCHEDULE}

    {INTRO_AND_SCENARIO_MUSIC breaking_the_chains.ogg knolls.ogg}
    {EXTRA_SCENARIO_MUSIC revelation.ogg}
    {EXTRA_SCENARIO_MUSIC traveling_minstrels.ogg}

    {campaigns/Eastern_Invasion/utils/deaths.cfg}

    [story]
        {TO_TRAINING_THE_OGRES}
    [/story]

    [side]
        type=Lieutenant
        id=Gweddry
        name= _ "Gweddry"
        side=1
        income=-2
        canrecruit=no
        controller=human
        team_name=wesnothians
        user_team_name=_"Wesnothians"
        gold=0
    [/side]

    [side]
        side=2
        controller=ai
        no_leader=yes
        team_name=monster
        user_team_name=_"Monsters"
    [/side]

#define OGRE
    [unit]
        type=Young Ogre
        side=2
        x=12
        y=10
    [/unit]
#enddef

    [event]
        name=prestart

        # {SCATTER_IMAGE (terrain=Gs^Fp) 8 scenery/pine2.png}

        [objectives]
            side=1
            [objective]
                description= _ "Survive until end of turns"
                condition=win
            [/objective]
            [objective]
                description= _ "To add ogres to your army, keep two on the grass until end of turns"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Gweddry"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Dacyn"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Owaec"
                condition=lose
            [/objective]

            note={NEW_GOLD_CARRYOVER_NOTE_100}
        [/objectives]
    [/event]

    [event]
        name=start
        [recall]
            id=Dacyn
        [/recall]
        [recall]
            id=Owaec
        [/recall]
        {OGRE}
        {OGRE}
        {OGRE}
#ifdef NORMAL
        {OGRE}
#endif
#ifdef HARD
        {OGRE}
        {OGRE}
#endif
        [message]
            speaker=Gweddry
            message= _ "Look, we have found a pack of ogres. We should try to capture some to train."
        [/message]
        [message]
            speaker=Dacyn
            message= _ "All right, we have to keep at least two of these ogres on the grass where they can't escape until our troops get here to capture them. Then they will have to lead us to their tribe."
        [/message]
        [message]
            speaker=Owaec
            message= _ "We should try to surround them. Gweddry, you stay where you are. Dacyn, you go north-east. I'll go north-west."
        [/message]
        [teleport]
            [filter]
                id=Owaec
            [/filter]
            x=7
            y=7
        [/teleport]
        [teleport]
            [filter]
                id=Dacyn
            [/filter]
            x=17
            y=7
        [/teleport]
    [/event]

    [event]
        name=moveto
        first_time_only=no
        [filter]
            type=Young Ogre
            x=1-25,1-2,23-24,1-25
            y=1-2,1-20,1-20,18-20
        [/filter]
        [message]
            speaker=Gweddry
            message= _ "We have let one escape. Let's hope they don't all!"
        [/message]
        [kill]
            type=Young Ogre
            x=1-25,1-2,23-24,1-25
            y=1-2,1-20,1-20,18-20
        [/kill]
    [/event]

    [event]
        name=time over
        [role]
            type=Young Ogre
            role=ogre
        [/role]
        [kill]
            role=ogre
        [/kill]
        [if]
            [have_unit]
                type=Young Ogre
            [/have_unit]
            [then]
                [message]
                    speaker=Dacyn
                    message= _ "Our troops have caught up! Now, we will be able to recruit ogres, since these will be able to convince their tribe to join us."
                [/message]
                [allow_recruit]
                    type=Young Ogre
                [/allow_recruit]
            [/then]
            [else]
                [message]
                    speaker=Gweddry
                    message= _ "We didn't capture enough of the ogres here. We will have to go on without them."
                [/message]
            [/else]
        [/if]
        [endlevel]
            result=victory
            bonus=yes
            {NEW_GOLD_CARRYOVER 100}
        [/endlevel]
    [/event]
[/scenario]
