#textdomain wesnoth-units
[unit_type]
    id=Troll Rocklobber
    name= _ "Troll Rocklobber"
    race=troll
    image="units/trolls/lobber.png"
    profile=portraits/trolls/troll-rocklobber.png
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=49
    movement_type=largefoot
    movement=5
    experience=100
    level=2
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    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]
    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/trolls/transparent/troll-rocklobber.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/trolls/transparent/troll-rocklobber.png"
    [/portrait]
    [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

        sling_stone_start_time=-800
        [if]
            hits=yes
            [sling_stone_frame]
                halo="projectiles/stone-large.png:800"
                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]

            [frame]
                image="units/trolls/lobber-attack-ranged1.png:200"
                sound=sling-big.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [sling_stone_frame]
                halo="projectiles/stone-large.png:900"
                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]

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