#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}
    ellipse="misc/ellipse"
    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]
        direction=s,se,sw
        start_time=-126
        [if]
            hits=hit,kill
            offset=0.0~-0.05:126,-0.05~0.0:126
            alpha=0.8~0.5:126,0.5~0.8:126
            [frame]
                duration=1
                image="units/undead/ghost-s-2.png"
            [/frame]
            [frame]
                duration=100
                image="units/undead/ghost-s-attack-1.png"
            [/frame]
            [frame]
                duration=150
                image="units/undead/ghost-s-attack-1.png"
                sound=wail-sml.wav
            [/frame]
            [frame]
                duration=1
                image="units/undead/ghost-s-2.png"
            [/frame]
        [/if]
        [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
            [frame]
                duration=1
                image="units/undead/ghost-s-2.png"
            [/frame]
            [frame]
                duration=100
                image="units/undead/ghost-s-attack-1.png"
            [/frame]
            [frame]
                duration=150
                image="units/undead/ghost-s-attack-1.png"
            [/frame]
            [frame]
                duration=1
                image="units/undead/ghost-s-2.png"
            [/frame]
        [/else]
    [/defend]
    [defend]
        direction=n,ne,nw
        start_time=-126
        [if]
            hits=hit,kill
            offset=0.0~-0.05:126,-0.05~0.0:126
            alpha=0.8~0.5:126,0.5~0.8:126
            [frame]
                duration=1
                image="units/undead/ghost-n-2.png"
            [/frame]
            [frame]
                duration=100
                image="units/undead/ghost-n-attack-1.png"
            [/frame]
            [frame]
                duration=150
                image="units/undead/ghost-n-attack-1.png"
                sound=wail-sml.wav
            [/frame]
            [frame]
                duration=1
                image="units/undead/ghost-n-2.png"
            [/frame]
        [/if]
        [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
            [frame]
                duration=1
                image="units/undead/ghost-n-2.png"
            [/frame]
            [frame]
                duration=100
                image="units/undead/ghost-n-attack-1.png"
            [/frame]
            [frame]
                duration=150
                image="units/undead/ghost-n-attack-1.png"
            [/frame]
            [frame]
                duration=1
                image="units/undead/ghost-n-2.png"
            [/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]
                duration=25
                image="units/undead/ghost-s-2.png"
            [/frame]
            [frame]
                duration=75
                image="units/undead/ghost-s-attack-1.png"
            [/frame]
            [frame]
                duration=150
                image="units/undead/ghost-s-attack-2.png"
                sound=wail-sml.wav
            [/frame]
            [frame]
                duration=75
                image="units/undead/ghost-s-attack-1.png"
            [/frame]
            [frame]
                duration=25
                image="units/undead/ghost-s-2.png"
            [/frame]
        [/if]
        [else]
            direction=n,ne,nw
            [frame]
                duration=25
                image="units/undead/ghost-n-2.png"
            [/frame]
            [frame]
                duration=75
                image="units/undead/ghost-n-attack-1.png"
            [/frame]
            [frame]
                duration=150
                image="units/undead/ghost-n-attack-2.png"
                sound=wail-sml.wav
            [/frame]
            [frame]
                duration=75
                image="units/undead/ghost-n-attack-1.png"
            [/frame]
            [frame]
                duration=25
                image="units/undead/ghost-n-2.png"
            [/frame]
        [/else]
    [/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
        direction=s,se,sw

        [frame]
            duration=25
            image="units/undead/ghost-s-2.png"
        [/frame]
        [frame]
            duration=175
            image="units/undead/ghost-s-attack-1.png"
        [/frame]
        [frame]
            duration=175
            image="units/undead/ghost-s-attack-2.png"
        [/frame]
        [frame]
            duration=100
            image="units/undead/ghost-s-attack-3.png"
            sound=wail-sml.wav
        [/frame]
        [frame]
            duration=75
            image="units/undead/ghost-s-attack-2.png"
        [/frame]
        [frame]
            duration=75
            image="units/undead/ghost-s-attack-1.png"
        [/frame]
        [frame]
            duration=25
            image="units/undead/ghost-s-2.png"
        [/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
        direction=n,ne,nw

        [frame]
            duration=25
            image="units/undead/ghost-n-2.png"
        [/frame]
        [frame]
            duration=175
            image="units/undead/ghost-n-attack-1.png"
        [/frame]
        [frame]
            duration=175
            image="units/undead/ghost-n-attack-2.png"
        [/frame]
        [frame]
            duration=100
            image="units/undead/ghost-n-attack-3.png"
            sound=wail-sml.wav
        [/frame]
        [frame]
            duration=75
            image="units/undead/ghost-n-attack-2.png"
        [/frame]
        [frame]
            duration=75
            image="units/undead/ghost-n-attack-1.png"
        [/frame]
        [frame]
            duration=25
            image="units/undead/ghost-n-2.png"
        [/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]
            duration=250
            image="units/undead/ghost-s-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-1.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-3.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-1.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-3.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-1.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-3.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-1.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-s-3.png"
        [/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]
            duration=250
            image="units/undead/ghost-n-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-1.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-3.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-1.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-3.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-1.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-3.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-1.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-2.png"
        [/frame]
        [frame]
            duration=250
            image="units/undead/ghost-n-3.png"
        [/frame]
    [/standing_anim]
[/unit_type]
