#textdomain wesnoth-units
[unit_type]
    id=Ghost
    name= _ "Ghost"
    race=undead
    image="units/undead/ghost-s-2.png"
    profile=portraits/undead/ghost.png
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=18
    movement_type=undeadspirit
    movement=7
    experience=30
    level=1
    alignment=chaotic
    advances_to=Wraith,Shadow
    cost=20
    usage=scout
    description= _ "Enslaved within a shroud of enchantments, a trapped spirit may be likened to the wind in the sails of a ship. This damned vessel becomes an unfailing servant which can be bound to whatever task their master sees fit."+{SPECIAL_NOTES}+{SPECIAL_NOTES_DRAIN}+{SPECIAL_NOTES_SPIRIT}+{SPECIAL_NOTES_ARCANE}
    die_sound=wail-long.wav
    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/undead/transparent/ghost.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/undead/transparent/ghost.png"
    [/portrait]
    [defend]
        start_time=-126
        [if]
            hits=hit
            offset=0.0~-0.05:126,-0.05~0.0:126
            alpha=0.8~0.5:126,0.5~0.8:126

            hit_sound_start_time=-25
            [hit_sound_frame]
                sound=wail-sml.wav
            [/hit_sound_frame]
        [/if]
        [else]
            hits=kill
            offset=0.0~-0.05:126,-0.05~0.0:126
            alpha=0.8~0.5:126,0.5~0.8:126
        [/else]
        [else]
            hits=miss
            offset=0.0~-0.1:126,-0.1~0.0:126
            alpha=0.8~0.25:126,0.25~0.8:126
        [/else]
        [if]
            direction=s,se,sw
            [frame]
                image=units/undead/ghost-s-2.png:1,units/undead/ghost-s-attack-1.png:250,units/undead/ghost-s-2.png:1
            [/frame]
        [/if]
        [else]
            direction=n,ne,nw
            [frame]
                image=units/undead/ghost-n-2.png:1,units/undead/ghost-n-attack-1.png:250,units/undead/ghost-n-2.png:1
            [/frame]
        [/else]
    [/defend]

    [attack]
        name=touch
        description=_"touch"
        icon=attacks/touch-undead.png
        type=arcane
        range=melee
        damage=4
        number=3
        [specials]
            {WEAPON_SPECIAL_DRAIN}
        [/specials]
    [/attack]
    [attack]
        name=wail
        description=_"wail"
        type=cold
        range=ranged
        damage=3
        number=3
    [/attack]
    [attack_anim]
        [filter_attack]
            name=wail
        [/filter_attack]
        {MISSILE_FRAME_WAIL}
        start_time=-200

        [if]
            direction=s,se,sw
            [frame]
                image="units/undead/ghost-s-2.png:25"
            [/frame]
            [frame]
                image="units/undead/ghost-s-attack-[1,2,1].png:[75,150,75]"
            [/frame]
            [frame]
                image="units/undead/ghost-s-2.png:25"
            [/frame]
        [/if]
        [else]
            direction=n,ne,nw
            [frame]
                image="units/undead/ghost-n-2.png:25"
            [/frame]
            [frame]
                image="units/undead/ghost-n-attack-[1,2,1].png:[75,150,75]"
            [/frame]
        [/else]
        attack_sound_start_time=-100
        [attack_sound_frame]
            sound=wail-sml.wav
        [/attack_sound_frame]
    [/attack_anim]

    [attack_anim]
        [filter_attack]
            name=touch
        [/filter_attack]
        start_time=-500
        offset=0.0~1.0:425,0.0:225
        alpha=0.8~0.0:425,0.0~0.8:225

        [if]
            direction=s,se,sw
            [frame]
                image="units/undead/ghost-s-2.png:25"
            [/frame]
            [frame]
                image="units/undead/ghost-s-attack-[1~3,2,1].png:[175*2,100,75*2]"
            [/frame]
            [frame]
                image="units/undead/ghost-s-2.png:25"
            [/frame]
        [/if]
        [else]
            direction=n,ne,nw
            [frame]
                image="units/undead/ghost-n-2.png:25"
            [/frame]
            [frame]
                image="units/undead/ghost-n-attack-[1~3,2,1].png:[175*2,100,75*2]"
            [/frame]
            [frame]
                image="units/undead/ghost-n-2.png:25"
            [/frame]
        [/else]

        attack_sound_start_time=-126
        [attack_sound_frame]
            duration=1
        [/attack_sound_frame]
        [attack_sound_frame]
            sound=wail-sml.wav
        [/attack_sound_frame]
    [/attack_anim]

    [standing_anim]
        direction=s,se,sw
        start_time=0
        alpha=0.8~0.4:1400,0.4~0.6:600,0.6~0.4:600,0.4~0.8:1400
        [frame]
            image="units/undead/ghost-s-[2,1~3,2,1~3,2,1~3,2,1~3].png:250"
        [/frame]
    [/standing_anim]
    [standing_anim]
        direction=n,ne,nw
        start_time=0
        alpha=0.8~0.4:1400,0.4~0.6:600,0.6~0.4:600,0.4~0.8:1400
        [frame]
            image="units/undead/ghost-n-[2,1~3,2,1~3,2,1~3,2,1~3].png:250"
        [/frame]
    [/standing_anim]
[/unit_type]
