#textdomain wesnoth-units
[unit_type]
    id=Troll Rocklobber
    name= _ "Troll Rocklobber"
    race=troll
    image="units/trolls/lobber.png"
    profile=portraits/trolls/troll.png
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=49
    movement_type=largefoot
    movement=5
    experience=150
    level=2
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    undead_variation=troll
    cost=29
    usage=mixed fighter
    description= _ "The thought of throwing a boulder in combat has certainly occurred to many trolls, and some have taken to them as a weapon of choice. Because stones well-shaped to fly true are not always easy to find, Rocklobbers have taken to carrying them in sacks slung over their shoulders. The same leather out of which the sack is formed is easily adapted to a crude sling."+{SPECIAL_NOTES}+{SPECIAL_NOTES_REGENERATES}
    die_sound={SOUND_LIST:TROLL_DIE}
    [abilities]
        {ABILITY_REGENERATES}
    [/abilities]
    [attack]
        name=fist
        description=_"fist"
        icon=attacks/fist-troll.png
        type=impact
        range=melee
        damage=10
        number=2
    [/attack]
    [attack]
        name=sling
        description=_"sling"
        type=impact
        range=ranged
        damage=17
        number=1
    [/attack]
    {DEFENSE_ANIM "units/trolls/lobber-defend.png" "units/trolls/lobber.png" {SOUND_LIST:TROLL_HIT} }
    [attack_anim]
        [filter_attack]
            name=sling
        [/filter_attack]

        start_time=-1000
        offset=0

        [if]
            hits=yes
            [sling_stone_frame]
                begin=-801
                end=-800
                image="misc/blank-hex.png"
            [/sling_stone_frame]
            [sling_stone_frame]
                begin=-800
                end=0
                halo="projectiles/stone-large.png"
                halo_x=24~0
                halo_y=0~-10,-10~-18,-18~-22,-22~-24,-24~-25,-25~-24,-24~-22,-22~-18,-18~-10,-10~-0
                offset=0.0~1.0
            [/sling_stone_frame]
            [sling_stone_frame]
                begin=0
                end=1
                image="misc/blank-hex.png"
            [/sling_stone_frame]

            [frame]
                duration=200
                image="units/trolls/lobber-attack-ranged1.png"
                sound=sling-big.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [sling_stone_frame]
                begin=-801
                end=-800
                image="misc/blank-hex.png"
            [/sling_stone_frame]
            [sling_stone_frame]
                begin=-800
                end=100
                halo="projectiles/stone-large.png"
                halo_x=24~0
                halo_y=0~-10,-10~-16,-16~-20,-20~-22,-22~-20,-20~-16,-16~-10,-10~0,0~-4,-4~0,0~-2,-2~0
                offset=0.0~1.5
            [/sling_stone_frame]
            [sling_stone_frame]
                begin=100
                end=101
                image="misc/blank-hex.png"
            [/sling_stone_frame]

            [frame]
                duration=200
                image="units/trolls/lobber-attack-ranged1.png"
                sound=sling-big-miss.ogg
            [/frame]
        [/else]
        [frame]
            duration=600
            image="units/trolls/lobber-attack-ranged2.png"
        [/frame]
        [frame]
            duration=100
            image="units/trolls/lobber-defend.png"
        [/frame]
        [frame]
            duration=100
            image="units/trolls/lobber.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=fist
        [/filter_attack]
        start_time=-200
        [frame]
            duration=50
            image="units/trolls/lobber.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=250
                image="units/trolls/lobber-attack-melee.png"
                sound=fist.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=250
                image="units/trolls/lobber-attack-melee.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=100
            image="units/trolls/lobber.png"
        [/frame]
    [/attack_anim]
[/unit_type]
