#textdomain wesnoth-dm
[scenario]
    name=_ "Night in the Swamp"
    id=07_Night_in_the_Swamp
    next_scenario=08_Ur-Thorodor
    {MEMOIRS_MAP 07_Night_in_the_Swamp.map}
    turns=12

    # There is one less turn than times, so time over displays on morning
    {DUSK}
    {FIRST_WATCH}
    {FIRST_WATCH}
    {FIRST_WATCH}
    {FIRST_WATCH}
    {FIRST_WATCH}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {DAWN}
    {MORNING}

    {SCENARIO_MUSIC underground.ogg}	# No story part, so no intro music
    {EXTRA_SCENARIO_MUSIC frantic.ogg}
    {EXTRA_SCENARIO_MUSIC vengeful.ogg}
    {EXTRA_SCENARIO_MUSIC siege_of_laurelmor.ogg}

    {DM_TRACK {SEARCH_STAGE7}}

    [side]
        {YOUNG_DELFADOR}
        side=1
        save_id=Player
        persistent=yes
        controller=human
        recruit=Mage,Spearman,Horseman,Bowman,Cavalryman,Heavy Infantryman
        team_name=allies
        user_team_name= _ "Loyalists"
        {FLAG_VARIANT loyalist}
    [/side]

    [side]
        side=2
        no_leader=yes
        team_name=enemies
        user_team_name= _ "Undead"
        {FLAG_VARIANT undead}
    [/side]

    victory_when_enemies_defeated=no

    {MEMOIRS_DEATHS}

#ifdef EASY
    {MEMOIRS_GENERATOR_SKELETON 18 3}
    {MEMOIRS_GENERATOR_SKELETON 10 16}
#endif

#ifdef NORMAL
    {MEMOIRS_GENERATOR_SKELETON 7 5}
    {MEMOIRS_GENERATOR_SKELETON 11 19}
#endif

#ifdef HARD
    {MEMOIRS_GENERATOR_SKELETON 18 3}
    {MEMOIRS_GENERATOR_SKELETON 7 5}
    {MEMOIRS_GENERATOR_SKELETON 11 19}
#endif HARD

    # if the player manages to destroy all generators...
    # an unlikely outcome unless we are on EASY
    [event]
        name=new turn
        first_time_only=no
        [if]
            [not]
                [have_unit]
                    side=2
                [/have_unit]
            [/not]
            [then]
                [message]
                    speaker=Delfador
                    message=_"I think that’s all of them! Let’s move on — the less time we spend in this swamp the better."
                [/message]
                [endlevel]
                    result=victory
                    bonus=yes
                [/endlevel]
            [/then]
        [/if]
    [/event]

    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                description=_ "Survive until daybreak"
                condition=win
                show_turn_counter=yes
            [/objective]
            [objective]
                {ALTERNATIVE_OBJECTIVE_CAPTION}
                description=_ "Destroy the stones"
                condition=win
            [/objective]
            [objective]
                description=_ "Death of Delfador"
                condition=lose
            [/objective]
            [objective]
                description=_ "Death of Lionel"
                condition=lose
            [/objective]

            [gold_carryover]
                bonus=yes
                carryover_percentage=80
            [/gold_carryover]

            [note]
                description=_ "Mages and Paladins are capable of destroying the stones"
            [/note]
        [/objectives]
    [/event]

    [event]
        name=start
        {MODIFY_UNIT (id=Delfador) facing nw}
        [recall]
            id=Lionel
        [/recall]
        {MODIFY_UNIT (id=Lionel) facing se}
        [message]
            speaker=Delfador
            message=_"These swamps seem to go on forever!"
        [/message]
        [message]
            speaker=Lionel
            message=_"One more day’s travel, I think. We should camp for the night now — we should be out of it by tomorrow evening."
        [/message]
    [/event]

    [event]
        name=new turn
        [message]
            speaker=Delfador
            message=_"Those standing stones — they summon evil creatures!"
        [/message]
        [message]
            speaker=Lionel
            message=_"I saw this kind of thing in the north... These abominations are not much affected by swords, but they fear the light of day. We must hold them off as best we can."
        [/message]
        [message]
            speaker=Delfador
            message=_"Hmmm... if I could get nearer to the stones, I could perhaps break their power..."
        [/message]
    [/event]

    # encourage the player who takes the hint about "swords"
    [event]
        name=attack
        [filter]
            type_adv_tree=Heavy Infantryman
        [/filter]
        [filter_second]
            type_adv_tree=Skeleton,Skeleton Archer
        [/filter_second]
        [message]
            speaker=unit
            message=_"This’ll splinter your bones, you vile monstrosity!"
        [/message]
    [/event]

    [event]
        name=time over
        [if]
            [have_unit]
                side=2
            [/have_unit]
            [then]
                [message]
                    speaker=Delfador
                    message=_"At last, morning is here... And the skeletons are disappearing!"
                [/message]
                [kill]
                    side=2
                [/kill]
                [redraw]
                [/redraw]
            [/then]
            [else]
                [message]
                    speaker=Delfador
                    message=_"At last, morning is here!"
                [/message]
            [/else]
        [/if]
        [message]
            speaker=Lionel
            message=_"I hope I never see another night like that! Let’s leave this evil place as quickly as possible — I want to get us out of Illuven before dusk."
        [/message]
        [endlevel]
            result=victory
            bonus=no
        [/endlevel]
    [/event]
[/scenario]
