#textdomain wesnoth-l
[scenario]

    id=civil_disobedience
    name= _ "Civil Disobedience"
    map_data="{campaigns/Liberty/maps/civil_disobedience.map}"
    {TURNS 14 13 12}

    next_scenario=a_strategy_of_hope
    {SCENARIO_MUSIC "loyalists.ogg"}
    victory_when_enemies_defeated=no

    [story]
        [part]
            music="loyalists.ogg"
            show_title=yes
            background="maps/wesnoth-liberty.png"
            {L_DOT 252 252}
            {L_CROSS 242 267}
        [/part]
    [/story]

    {AFTERNOON}
    {DUSK}
    {FIRST_WATCH}
    {SECOND_WATCH}
    {DAWN}
    {MORNING}

    [side]
        type=Bandit_Peasant
        description=Baldras
        user_description= _ "Baldras"
        profile=portraits/p_baldras.png
        side=1
        canrecruit=yes
        controller=human
        gold=100
        team_name=good_guys
        recruit=Footpad_Peasant,Poacher_Peasant,Thug_Peasant
    [/side]

    {STARTING_VILLAGES 1 12}

    [side]
        type=Cavalier
        description=Tarwen
        user_description= _ "Tarwen"
        side=2
        canrecruit=yes
        controller=ai
        team_name=bad_guys
        [ai]
            [protect_location]
                x,y=30,7
                radius=11
                value=10
            [/protect_location]
        [/ai]
    [/side]

    #The peasants - no leader or keep, but they help you as allies
    #by getting trampled on the first turn
    [side]
        side=3
        no_leader=yes
        controller=ai
        team_name=good_guys
    [/side]

    [event]
        name=prestart

        [objectives]
            side=1
            [objective]
                description= _ "Kill the Wesnoth army captain, Tarwen"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Baldras"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Harper"
                condition=lose
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition=lose
            [/objective]
        [/objectives]

        {PLACE_IMAGE items/scarecrow.png 33 13}
        {PLACE_IMAGE "items/scarecrow.png~FL(horiz)" 22 1}

        {PLACE_IMAGE items/straw-bale1.png 36 14}
        {PLACE_IMAGE items/straw-bale2.png 37 6}
        {PLACE_IMAGE "items/straw-bale1.png~FL(horiz)" 19 5}
        {PLACE_IMAGE items/grain-sheaf.png 23 12}

        {PLACE_IMAGE "scenery/oak-leaning.png" 31 9}

        {GENERIC_UNIT 3 Peasant 21 4}
        {GENERIC_UNIT 3 Peasant 26 3}
        {GENERIC_UNIT 3 Peasant 29 6}
        {GENERIC_UNIT 3 Peasant 30 8}
        {GENERIC_UNIT 3 Peasant 27 13}

        {MODIFY_UNIT type=Peasant facing sw}
    [/event]

    #
    # Starting conversation and actions
    #
    [event]
        name=start

        [recall]
            description=Harper
        [/recall]
        [message]
            description=Harper
            message= _ "Look, riders approach."
        [/message]
        [message]
            description=Baldras
            message= _ "Stand fast, nephew."
        [/message]

        {MOVE_UNIT description=Tarwen 7 9}

        [capture_village]
            x=6-10
            y=8-11
            side=2
        [/capture_village]

        [message]
            description=Tarwen
            message= _ "By order of the Queen, the magistrate of this town is ordered to travel with us to Elensefar for vetting."
        [/message]
        [message]
            description=Harper
            message= _ "Garard is the King of Wesnoth. We are ruled by no queen."
        [/message]
        [message]
            description=Tarwen
            message= _ "Insolent peasants, you will kneel before your betters! Asheviere is the queen of Wesnoth. The King fell three weeks ago at Abez. I shall not bandy words with you. Your magistrate will be coming with us, and we do not care if it is dead or alive."
        [/message]

        {GENERIC_UNIT 2 Cavalryman 19 7}
        {MOVE_UNIT x,y=19,7 24 6}

        {GENERIC_UNIT 2 Cavalryman 19 7}
        {MOVE_UNIT x,y=19,7 24 8}

        {GENERIC_UNIT 2 Cavalryman 19 7}
        {MOVE_UNIT x,y=19,7 26 8}

        {GENERIC_UNIT 2 Cavalryman 19 7}
        {MOVE_UNIT x,y=19,7 26 6}

#ifdef NORMAL
        {GENERIC_UNIT 2 Horseman 19 7}
        {MOVE_UNIT x,y=19,7 23 5}

        {GENERIC_UNIT 2 Horseman 19 7}
        {MOVE_UNIT x,y=19,7 22 9}
#endif
#ifdef HARD
        {GENERIC_UNIT 2 Horseman 19 7}
        {MOVE_UNIT x,y=19,7 23 5}

        {GENERIC_UNIT 2 Horseman 19 7}
        {MOVE_UNIT x,y=19,7 22 9}

        {GENERIC_UNIT 2 Horseman 19 7}
        {MOVE_UNIT x,y=19,7 22 6}
#endif
        [message]
            description=Tarwen
            message= _ "Guard the gate."
        [/message]

        {GENERIC_UNIT 2 Spearman 18 6}
        {MOVE_UNIT x,y=18,6 20 6}

        {GENERIC_UNIT 2 Spearman 18 7}
        {MOVE_UNIT x,y=18,7 20 7}

        [message]
            description=Baldras
            message= _ "Harper, get out of here. This is no battle for you."
        [/message]

        [message]
            description=Baldras
            message= _ "I am the magistrate of Dallben, and it is YOU who will be leaving Dallben, be it dead or alive."
        [/message]
    [/event]

    #
    #Special event - when you attack Tarwen, he stops being passive (surprise!)
    #
    [event]
        name=attack
        [filter_second]
            description=Tarwen
        [/filter_second]

        [message]
            description=Tarwen
            message= _ "Get back, you cur!"
        [/message]
    [/event]
    #
    # Victory
    #
    [event]
        name=die
        [filter]
            description=Tarwen
        [/filter]

        [message]
            speaker=second_unit
            message= _ "Get out of my village!"
        [/message]

        [kill]
            side=2
        [/kill]

        [message]
            description=Baldras
            message= _ "Our lives were hard enough when we were beneath the attention of the Crown. But now I fear things will be worse."
        [/message]

        [message]
            description=Harper
            message= _ "We must tell the people of Delwyn about this."
        [/message]

        [role]
            type=Fugitive_Peasant,Outlaw_Peasant,Huntsman_Peasant,Human Ranger,Trapper_Peasant,Poacher_Peasant,Thug_Peasant
            [not]
                description=Harper
            [/not]
            role=Advisor
        [/role]

        [message]
            role=Advisor
            message= _ "That is true. We have always flown to their aid, and they to ours. This is something we should face together."
        [/message]

        [message]
            description=Baldras
            message= _ "Very well. We will go to Delwyn and share counsel with them. I never thought Wesnoth would fall into darkness. Now, not only do the orcs threaten our lands, but some sinister thing is happening with the ascent of the Queen to the throne."
        [/message]

        [message]
            description=Baldras
            message= _ "Today we may no longer be citizens of Wesnoth. I wish it could be otherwise, but we are now outlaws."
        [/message]

        {CHG_TYPE type=Footpad_Peasant Footpad}
        {CHG_TYPE type=Outlaw_Peasant Outlaw}
        {CHG_TYPE type=Fugitive_Peasant Fugitive}
        {CHG_TYPE type=Thug_Peasant Thug}
        {CHG_TYPE type=Bandit_Peasant Bandit}
        {CHG_TYPE type=Highwayman_Peasant Highwayman}
        {CHG_TYPE type=Poacher_Peasant Poacher}
        {CHG_TYPE type=Trapper_Peasant Trapper}
        {CHG_TYPE type=Huntsman_Peasant Huntsman}

        # Changing the unit type clobbers its portrait pointer if the new
        # type has a unit portrait. Make sure Baldras and Harper keep theirs.
        {MODIFY_UNIT description=Baldras profile portraits/p_baldras.png}
        {MODIFY_UNIT description=Harper profile portraits/p_harper.png}

        #clean up duplicates out of the recall list
        [store_unit]
            variable=cleanup_store
            kill=yes
            [filter]
                type=Footpad_Peasant,Outlaw_Peasant,Fugitive_Peasant,Thug_Peasant,Bandit_Peasant,Highwayman_Peasant,Poacher_Peasant,Trapper_Peasant,Huntsman_Peasant
            [/filter]
        [/store_unit]
        {CLEAR_VARIABLE cleanup_store}

        [disallow_recruit]
            side=1
            type=Thug_Peasant,Footpad_Peasant,Poacher_Peasant
        [/disallow_recruit]
        [allow_recruit]
            side=1
            type=Thug,Footpad,Poacher
        [/allow_recruit]
        [endlevel]
            result=victory
            bonus=yes
        [/endlevel]
    [/event]

    #
    # Loss conditions - turns run out
    #
    [event]
        name=time over
        [message]
            description=Baldras
            message= _ "Oh, no! We have run out of time, they have arrived with reinforcements..."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    {LIBERTY_DEATHS}
[/scenario]
