#textdomain wesnoth-httt
[scenario]
    id=02_Blackwater_Port
    name= _ "Blackwater Port"
    next_scenario=03_The_Isle_of_Alduin
    map_data="{campaigns/Heir_To_The_Throne/maps/02_Blackwater_Port.map}"
    {DEFAULT_SCHEDULE}
    {TURNS 12 12 9}

    {SCENARIO_MUSIC "loyalists.ogg"}	# No story part
    {EXTRA_SCENARIO_MUSIC "knolls.ogg"}

    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                description= _ "Resist until the end of the turns"
                condition=win
            [/objective]
#ifdef HARD
            [objective]
                description= _ "<255,255,255>Alternative objective:
@Defeat the enemy leader
`(special bonus)"
                condition=win
            [/objective]
#endif
            [objective]
                description= _ "Death of Konrad"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Delfador"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Sir Kaylan"
                condition=lose
            [/objective]

            note={NEW_GOLD_CARRYOVER_NOTE_40}	# wmllint: ignore
        [/objectives]
    [/event]

    {BIGMAP_BLACKWATER_PORT}

    [label]
        x,y=27,8
        text= _ "Blackwater Port"
    [/label]

    [side]
        type=Commander
        id=Konrad
        name= _ "Konrad"
        unrenamable=yes
        side=1
        canrecruit=yes
        team_name=elves
        user_team_name=_"Rebels"
        gold=100
        controller=human
    [/side]

    {STARTING_VILLAGES 1 9}

    [side]
        type=Grand Knight
        id=Kaylan
        name= _ "Sir Kaylan"

        side=2
        canrecruit=yes
        team_name=elves
        user_team_name=_"Rebels"
        recruit=Horseman,Knight
        [ai]
            recruitment_pattern=fighter
            villages_per_scout=0
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.45
            grouping=defensive
        [/ai]
        {GOLD 120 70 40}
    [/side]

    {STARTING_VILLAGES_AREA 2 17 15 25}

    [side]
        type=Orcish Warrior
        id=Mokolo Qimur
        name= _ "Mokolo Qimur"
        experience=0
        side=3
        canrecruit=yes
        team_name=orcs
        user_team_name=_"Orcs"
        recruit=Orcish Grunt,Wolf Rider,Orcish Archer,Troll Whelp
        {GOLD 100 160 220}
        {INCOME 8 16 20}
        [ai]
            {ATTACK_DEPTH 1 3 5}
        [/ai]
    [/side]

    {STARTING_VILLAGES_AREA 3 3 19 5}

    [event]
        name=prestart

        # {SCATTER_IMAGE (terrain=Gg)  5 scenery/pine1.png}
        # {SCATTER_IMAGE (terrain=Gg)  3 scenery/pine2.png}
        {PLACE_IMAGE scenery/rock1.png 23 17}

        [unit]
            type=Swordsman
            x=23
            y=10
            id=Veocyn
            name= _ "Veocyn"
            ai_special=guardian
            side=2
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            type=Swordsman
            x=25
            y=11
            id=Yran
            name= _ "Yran"
            ai_special=guardian
            side=2
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]

        [recall]
            id=Delfador
        [/recall]
    [/event]

    [event]
        name=start
        [message]
            speaker=Delfador
            message= _ "We should be able to board a ship at Blackwater Port, but it seems the orcs are heading there too. Rebels who hate Asheviere and are loyal to the memory of the king desperately hold the port, as it is one of the only places where they can ship supplies and weapons."
        [/message]
        [message]
            speaker=Konrad
            message= _ "Delfador, some orcs are following us! We must make haste!"
        [/message]
        [message]
            speaker=Kaylan
            message= _ "Delfador, my old friend! We had heard of your coming, and of the attacks on the elves. It is good to see you again, although I would prefer it were not in such sad times."
        [/message]
        [message]
            speaker=Delfador
            message= _ "Konrad, this is Kaylan, one of the mightiest of the horse lords, and one of the few who is willing to oppose the Dark Crown. Rumor has it that his lance has slain fifty men and a hundred orcs."
        [/message]
        [message]
            speaker=Kaylan
            message= _ "It seems the orcs have come here too, to try to wrest this port from our hands. Our defenses are still weak, but reinforcements will arrive soon!"
        [/message]
        [message]
            speaker=Konrad
            message= _ "We will help you fight them off until the reinforcements arrive."
        [/message]
        [message]
            speaker=Kaylan
            message= _ "With your help, we have hope we can fend them off. But you must not tarry here long, for your survival is even more important to our cause than the strength of the port. A ship is due here in two days, surely it will be able to take you to safety."
        [/message]
        [message]
            speaker=Konrad
            message= _ "And the ship will take us to Alduin?"
        [/message]
        [message]
            speaker=Delfador
            message= _ "Yes, we will sail to the Isle of Alduin, my home Konrad, and the home of many magi."
        [/message]
        [message]
            speaker=Kaylan
            message= _ "I will send one of my horsemen to serve under you. I offer you my support, Konrad, and the support of my men - from now on you will be able to recruit horsemen."
        [/message]
        #   [message]
        #   speaker=narrator
        #   image="wesnoth-icon.png"
        #   message= _ "You may now recruit horsemen!"
        #   [/message]
        [message]
            speaker=Konrad
            message= _ "Thank you, sir. But how shall I best use these horsemen? How do they differ from elves?"
        [/message]
#ifdef EASY
        [message]
            speaker=Kaylan
            message= _ "Elves are a powerful race, Konrad, more powerful than my own people usually acknowledge. But horsemen are powerful in a different way. They have no long range attack, but can charge into combat, inflicting double normal damage, though taking double damage in return. They are also lawful, meaning they fight better by day, and worse at night. Horsemen are unmatched on open land, though elves will serve you better in forests or rugged terrain."
        [/message]
#else
        [message]
            speaker=Kaylan
            message= _ "Elves may be the lords of the forest, but horsemen are powerful as well. On the plains under the midday sun they can fell the toughest foes with sharp spears and under heavy hoofs!"
        [/message]
#endif
        [message]
            speaker=Delfador
            message= _ "Recruit troops wisely, Konrad, and remember that you can recall experienced units from past battles to help you fight again."
        [/message]
        [unit]
            id=Haldiel
            name= _ "Haldiel"
            type=Horseman
            x=23
            y=24
            side=1
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_STRONG}
            [/modifications]
        [/unit]
        [message]
            speaker=Haldiel
            message= _ "Greetings, young master. I pledge myself to your service."
        [/message]
        [message]
            speaker=Delfador
            message= _ "Konrad, note that Haldiel does not seek gold upkeep; as a loyal unit he fights for us solely out of loyalty to our cause. Such units are extremely valuable. Take care to use them cautiously in battle, lest they fall."
        [/message]
        [allow_recruit]
            side=1
            type=Horseman
        [/allow_recruit]
    [/event]

    [event]
        name=time over
        [unit]
            type=Horseman
            id=Yredd
            name= _ "Yredd"
            x=35
            y=6
            ai_special=guardian
            side=2
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            type=Horseman
            id=Tarcyn
            name= _ "Tarcyn"
            x=35
            y=6
            ai_special=guardian
            side=2
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            type=Horseman
            id=Syryn
            name= _ "Syryn"
            x=35
            y=6
            ai_special=guardian
            side=2
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            type=Knight
            id=Cicyn
            name= _ "Cicyn"
            x=35
            y=6
            ai_special=guardian
            side=2
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            type=Knight
            id=Ginvan
            name= _ "Ginvan"
            x=35
            y=6
            ai_special=guardian
            side=2
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            type=Knight
            id=Simyr
            name= _ "Simyr"
            x=35
            y=6
            ai_special=guardian
            side=2
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [message]
            speaker=Kaylan
            message= _ "Reinforcements have arrived! Forward, men! I expect each of you to bring me back the head of an orc!"
        [/message]
        [message]
            speaker=Mokolo Qimur
            image=portraits/orcs/warlord3.png
            message= _ "So many foul humans riding on horses! There is no way we can defeat them. Quick, we must make our escape!"
        [/message]
        [endlevel]
            result=victory
            bonus=no
            {NEW_GOLD_CARRYOVER 40}
        [/endlevel]
    [/event]

    [event]
        name=die
        [filter]
            id=Mokolo Qimur
        [/filter]

        #
        # A bonus for anyone who can beat the leader on the HARD level
        #
#ifdef HARD
        [unit]
            type=Horseman
            id=Yredd
            name= _ "Yredd"
            x=35
            y=6
            ai_special=guardian
            side=2
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            type=Horseman
            id=Tarcyn
            name= _ "Tarcyn"
            x=35
            y=6
            ai_special=guardian
            side=2
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            type=Horseman
            id=Syryn
            name= _ "Syryn"
            x=35
            y=6
            ai_special=guardian
            side=2
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            type=Knight
            id=Cicyn
            name= _ "Cicyn"
            x=35
            y=6
            ai_special=guardian
            side=2
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            type=Knight
            id=Ginvan
            name= _ "Ginvan"
            x=35
            y=6
            ai_special=guardian
            side=2
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/unit]
        [unit]
            type=Knight
            id=Simyr
            name= _ "Simyr"
            x=35
            y=6
            side=1
            facing=sw
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_INTELLIGENT}
            [/modifications]
        [/unit]
        [redraw]
        [/redraw]
        [message]
            speaker=Kaylan
            message= _ "Reinforcements have arrived, but lo! Our allies have already destroyed the orcish army menacing our fair port. In honor, I must reward your valor."
        [/message]
        [message]
            speaker=Kaylan
            message= _ "You have risked your life to defend our city. In return, I place one of my city's finest defenders in your service. Simyr, step forward. I place your lance in the service of young prince Konrad here. May you help him restore order to the country."
        [/message]
        [message]
            speaker=Simyr
            message= _ "It is my pleasure and honor to serve, my liege."
        [/message]
#endif

        [endlevel]
            result=victory
            bonus=yes
            {NEW_GOLD_CARRYOVER 40}
        [/endlevel]
    [/event]

    [event]
        name=victory
        [message]
            speaker=Kaylan
            message= _ "Thank you for the help, friends. The ship should arrive soon, it will take you to Alduin."
        [/message]
        [move_unit_fake]
            type=Galleon
            side=1
            x=1,2,3,4,5,6,7,8,9,9,9,10,11,12,13,14,15,16,17,18,19,20,21
            y=2,2,3,3,4,4,5,5,6,7,8, 8, 9, 9,10,10,10, 9, 9, 8, 8, 7, 7
        [/move_unit_fake]

        {PLACE_IMAGE "units/transport/galleon.png~RC(magenta>red)" 21 7}

        [message]
            speaker=Delfador
            message= _ "We should embark now."
        [/message]
        [message]
            speaker=Kaylan
            message= _ "Safe voyage to you, friends. Rest assured that we will never surrender to the forces of the Dark Queen."
        [/message]
    [/event]

    #
    # Death event for Sir Kaylan
    #
    [event]
        name=die
        [filter]
            id=Kaylan
        [/filter]
        [message]
            speaker=unit
            message= _ "I have failed in my duty to protect the Rightful Heir and the port."
        [/message]
        [message]
            speaker=Delfador
            message= _ "Without his help, we will be unable to use the ships. There is no hope..."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    {campaigns/Heir_To_The_Throne/utils/deaths.cfg}
[/scenario]
