#textdomain wesnoth-sof
[scenario]
    name= _ "The Jeweler"
    id=4t_The_Jeweler
    turns=1
    map_file=Dwarven_City.map
    next_scenario=5_Hills_of_the_Shorbear_Clan
    theme=Cutscene_Minimal

    {SCENARIO_MUSIC underground.ogg}

    {UNDERGROUND}

    [side]
        type=Dwarvish Fighter
        id=Rugnur
        side=1
        x,y=19,17
        canrecruit=yes
        controller=human
        recruit=Dwarvish Fighter,Dwarvish Thunderer,Dwarvish Guardsman,Dwarvish Scout
        gold=0
        team_name=dwarves
        user_team_name= _ "Dwarves"
        {FLAG_VARIANT knalgan}
    [/side]

    [side]
        type=Dwarvish Lord
        id=Durstorn
        name= _ "Durstorn"
        x,y=11,5
        facing=ne
        side=2
        canrecruit=yes
        profile=portraits/durstorn.webp
        recruit=Dwarvish Fighter,Dwarvish Guardsman
        team_name=dwarves
        user_team_name= _ "Dwarves"
        {FLAG_VARIANT knalgan}
    [/side]

    {STARTING_VILLAGES 2 20}

    [story]
        [part]
            story= _ "Rugnur and his companions returned home. Now, I do not want to give the impression that only Rugnur and Thursagan worked on this masterpiece. There were others — many others. Thus I present Theganli, the jeweler. His role is small, but an important one."
        [/part]
    [/story]

    {SOF_TRACK {JOURNEY_04T_NEW} }

    [event]
        name=prestart

        [item]
            image=items/ruby.png
            x,y=11,4
        [/item]

        # Jeweler's workshop
        [terrain]
            terrain=Urb
            x,y=12-14,23
        [/terrain]
        [terrain]
            terrain=Urb^Ebn
            x,y=13,24
        [/terrain]
        [item]
            image=items/anvil.png
            x,y=12,23
        [/item]
        #Durstorn's guard
        [unit]
            x,y=12,11
            side=2
            type=Dwarvish Stalwart
            id=Neglur
            name= _ "Neglur"
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_RESILIENT}
            [/modifications]
        [/unit]
        [unit]
            x,y=10,9
            side=2
            type=Dwarvish Runesmith
            id=Glinar
            name= _ "Glinar"
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_QUICK}
            [/modifications]
        [/unit]
        [unit]
            x,y=8,10
            side=2
            type=Dwarvish Thunderguard
            id=Noiraran
            name= _ "Noiraran"
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_INTELLIGENT}
            [/modifications]
        [/unit]
        [unit]
            x,y=10,12
            side=2
            type=Dwarvish Steelclad
            id=Kuhnar
            name= _ "Kuhnar"
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_QUICK}
            [/modifications]
        [/unit]
    [/event]

    [event]
        name=start
        #alanin, baglur, krawg and thursagan
        {MOVE_UNIT id=Rugnur 15 14}
        [recall]
            id=Alanin
            x,y=17,14
        [/recall]
        [recall]
            id=Baglur
            x,y=16,12
        [/recall]
        [recall]
            id=Krawg
            x,y=15,16
        [/recall]
        [recall]
            id=Thursagan
            x,y=13,13
        [/recall]
        #dialogue starts
        [message]
            speaker=Durstorn
            message= _ "So, you have returned. I assume you have obtained the required materials? My jeweler Theganli has spent great time and expense buying jewels from some of the northern clans. Now go to the forge and make your sceptre. What do you need to annoy me for?"
        [/message]
        [message]
            speaker=Thursagan
            message= _ "We don’t need you, we need the ruby. I’ll take it to Theganli and we’ll review the cuts we plan to make."
        [/message]
        {MODIFY_UNIT (id=Durstorn) facing se}
        [message]
            speaker=Durstorn
            message= _ "You’re going to cut the jewel?! Are you insane?"
            image=portraits/durstorn-insane.webp
        [/message]
        [message]
            speaker=Rugnur
            message= _ "What do you mean, sir? You knew all along the jewel would have to be cut to make the sceptre."
        [/message]
        [message]
            speaker=Durstorn
            message= _ "Oh... right, right. Fine!"
        [/message]
        {MOVE_UNIT id=Durstorn 11 11}
        [message]
            speaker=Durstorn
            message= _ "Theganli?"
        [/message]
        [message]
            speaker=Kuhnar
            message= _ "He’s in his shop, in the southern tunnel."
        [/message]
        [message]
            speaker=Durstorn
            message= _ "<i>Harrumph!</i> Kuhnar, go summon him!"
        [/message]
        {MOVE_UNIT id=Kuhnar 12 19}
        {MODIFY_UNIT (id=Kuhnar) facing sw}
        [message]
            speaker=Kuhnar
            message= _ "Theganli! Come out of there, Durstorn orders you to come to the citadel."
        [/message]
        [unit]
            x,y=11,20
            type=Dwarvish Runesmith
            side=2
            id=Theganli
            name= _ "Theganli"
            facing=se
        [/unit]
        [message]
            speaker=Theganli
            message= _ "Coming... coming... stop pounding on the door!"
        [/message]
        [message]
            speaker=Thursagan
            message= _ "He doesn’t need to come here, I’ll take the jewel to his shop. He’ll need his tools anyway."
        [/message]
        {MOVE_UNIT id=Thursagan 11 4}
        [remove_item]
            image=items/ruby.png
            x,y=11,4
        [/remove_item]
        {MOVE_UNIT id=Thursagan 12 20}
        {MODIFY_UNIT (id=Thursagan) facing nw}
        [message]
            speaker=Thursagan
            message= _ "Well, Theganli, what do you think of this ruby?"
        [/message]
        [message]
            speaker=Theganli
            message= _ "Uh, um, yes, yes, very impressive ruby... even in this raw form, it has an odd brilliance!"
        [/message]
        [message]
            speaker=Thursagan
            message= _ "Do you think you could cut it in the manner my plans specify?"
        [/message]
        [message]
            speaker=Theganli
            message= _ "Maybe... maybe... it will be hard, let me see..."
        [/message]
        [message]
            speaker=Thursagan
            message= _ "Very well. See what you can do."
        [/message]
        {MOVE_UNIT id=Theganli 13 23}
        {MODIFY_UNIT (id=Theganli) facing sw}
        [sound]
            name=mace.ogg
        [/sound]
        [delay]
            time=300
        [/delay]
        {MODIFY_UNIT (id=Theganli) facing se}
        [sound]
            name=mace.ogg
        [/sound]
        [delay]
            time=300
        [/delay]
        {MODIFY_UNIT (id=Theganli) facing sw}
        [sound]
            name=mace.wav
        [/sound]
        [delay]
            time=300
        [/delay]
        {MODIFY_UNIT (id=Theganli) facing se}
        [sound]
            name=fire.wav
        [/sound]
        [delay]
            time=300
        [/delay]
        {MODIFY_UNIT (id=Theganli) facing sw}
        [sound]
            name=flame-big.ogg
        [/sound]
        [delay]
            time=200
        [/delay]
        {MODIFY_UNIT (id=Theganli) facing se}
        [sound]
            name=melee-fire.ogg
        [/sound]
        [delay]
            time=200
        [/delay]
        {MODIFY_UNIT (id=Theganli) facing sw}
        [sound]
            name=sword-1.ogg
        [/sound]
        [delay]
            time=200
        [/delay]
        [sound]
            name=sword-1.ogg
        [/sound]
        [delay]
            time=750
        [/delay]
        [sound]
            name=dragonstick.ogg
        [/sound]
        [delay]
            time=500
        [/delay]
        {MOVE_UNIT id=Theganli 11 20}
        [message]
            speaker=Durstorn
            message= _ "Well, do you have anything yet?!"
        [/message]
        [message]
            speaker=Theganli
            message= _ "Ah, well, uh, no... no... unfortunately... it seems it can’t be cut, or scratched, or damaged at all! At least not by my tools..."
        [/message]
        [message]
            speaker=Thursagan
            message= _ "So what do you propose we do? This ruby needs to be cut, and cut in a specific way."
        [/message]
        [message]
            speaker=Theganli
            message= _ "Well... maybe you can ask the Shorbear clan? They have good tools... chisels made of a metal that could only be worked in the heat of a volcanic forge. I don’t know how true that legend is, but their work is well known among us gem crafters."
        [/message]
        [message]
            speaker=Rugnur
            message= _ "Shorbear? Who are they?"
        [/message]
        [message]
            speaker=Theganli
            message= _ "Another group of dwarves that live south of here... above ground, if you can believe it! Yes, they’re the best jewelers..."
        [/message]
        [message]
            speaker=Durstorn
            message= _ "Well, Rugnur, what are you waiting for? Go down and get these tools from them, and carve the jewel!"
        [/message]
        [if]
            [have_unit]
                id=Baglur
            [/have_unit]
            [then]
                [message]
                    speaker=Baglur
                    message= _ "We can’t just go in there and take their property. We’ll have to buy or rent it from them."
                [/message]
            [/then]
            [else]
                [message]
                    speaker=Rugnur
                    message= _ "We can’t just go in there and take their property. We’ll have to buy or rent it from them."
                [/message]
            [/else]
        [/if]
        [message]
            speaker=Durstorn
            message= _ "Fine! Go rent it from them."
        [/message]
        [message]
            speaker=Rugnur
            message= _ "Very well, sir. We’ll go south now."
        [/message]
        [message]
            speaker=Durstorn
            message= _ "Wait! Last time you made a bargain by yourself you lost us five thousand pieces of silver. I’m going with you this time!"
        [/message]
        [message]
            speaker=Kuhnar
            message= _ "Are you sure that is wise, lord?"
        [/message]
        [message]
            speaker=Durstorn
            message= _ "Of course it is! You and Noiraran are going to come with us!"
        [/message]
        [message]
            speaker=Kuhnar
            message= _ "Yes sir..."
        [/message]
        #these shouldn’t still exist. :)
        [kill]
            side=1
            type=Dwarvish Miner
        [/kill]
        [endlevel]
            result=victory
            bonus=no
            {NEW_GOLD_CARRYOVER 100}
            carryover_report=no
            linger_mode=no
            replay_save=no
        [/endlevel]
    [/event]
[/scenario]
