#textdomain wesnoth-ei
[unit_type]
    [base_unit]
        id=Ancient Lich
    [/base_unit]
    id=Lich Lord
    name= _ "Lich Lord"

    #rename ravanal's shadow wave attack so it uses the new animation
    [attack]
    [/attack]
    [attack]
    [/attack]
    [attack]
        name=ravanal_shadow_wave # wmllint: no-icon
    [/attack]

    [animation]
        apply_to=summon

        start_time=-300
        [frame]
            image="units/undead-necromancers/ancient-lich-magic-[1~3,1].png:100"
        [/frame]
        sound_start_time=-200
        [sound_frame]
            sound=magic-dark-big.ogg
        [/sound_frame]
        [frame]
            image="units/undead-necromancers/ancient-lich.png:1"
        [/frame]
    [/animation]
    [animation]
        apply_to=pre_teleport

        {TELEPORT_OUT_ANIMATION}
    [/animation]
    [animation]
        apply_to=post_teleport

        {TELEPORT_IN_ANIMATION}
    [/animation]
    [animation]
        apply_to=recruited

        {TELEPORT_IN_ANIMATION}
    [/animation]
    [animation]
        apply_to=failed_teleport

        {TELEPORT_FAILED_ANIMATION}
    [/animation]
    [animation]
        apply_to=death

        start_time=0

        missile_start_time=-245

        burst_1_start_time=0
        burst_2_start_time=400
        burst_3_start_time=800

        smoke_1_start_time=1800
        smoke_2_start_time=2400
        smoke_3_start_time=3000

        [if]
            direction=n,ne,nw

            [missile_frame]
                halo="halo/holy/light-beam-[1~7,6~1].png:[30*6,130,70*6]"
            [/missile_frame]
        [/if]
        [else]
            direction=s,se,sw

            [missile_frame]
                halo="halo/holy/light-beam-[1~7,6~1].png~FL(vert):[30*6,130,70*6]"
            [/missile_frame]
        [/else]

        [frame]
            duration=2000
            image="units/undead-necromancers/ancient-lich.png"
            blend_color=127,0,127
            blend_ratio=0~1
            sound=lich-die.ogg
        [/frame]
        [frame]
            duration=500
            image="misc/blank-hex.png~SCALE(144,144)~BLIT(units/undead-necromancers/ancient-lich.png~CS(127,0,127),36,36)~BL([15,10,20,30,40,50,60,70])"
            alpha=1,1~0
            blend_color=255,255,255
            blend_ratio=0~1
            sound=magicmissile.wav
        [/frame]

        [burst_1_frame]
            image="projectiles/fireball-impact-[1~16].png:60"
            alpha=0:1,1:960,0:1
            image_mod="B(63)~G(-31)"
            x,y=-15,-10
            auto_vflip=no
        [/burst_1_frame]
        [burst_2_frame]
            image="projectiles/fireball-impact-[1~16].png:60"
            alpha=0:1,1:960,0:1
            image_mod="B(63)~G(-31)"
            x,y=20,-5
            auto_vflip=no
        [/burst_2_frame]
        [burst_3_frame]
            image="projectiles/fireball-impact-[1~16].png:60"
            alpha=0:1,1:960,0:1
            image_mod="B(63)~G(-31)"
            x,y=-5,10
            auto_vflip=no
            sound=magic-dark.ogg
        [/burst_3_frame]

        [smoke_1_frame]
            image="terrain/misc/smoke-A[01~12,01~12,01~12,01~12,01~12,01~12].png~SCALE([72~143],[144~215]):50"
            alpha=0~1,1,1,1~0
            image_mod="~CS(-31,-255,-31)"
            y=0~-200
            auto_vflip=no
        [/smoke_1_frame]
        [smoke_2_frame]
            image="terrain/misc/smoke-A[01~12,01~12,01~12,01~12,01~12,01~12].png~SCALE([72~143],[144~215]):50"
            alpha=0~1,1,1,1~0
            image_mod="~CS(-31,-255,-31)"
            y=0~-200
            auto_vflip=no
        [/smoke_2_frame]
        [smoke_3_frame]
            image="terrain/misc/smoke-A[01~12,01~12,01~12,01~12,01~12,01~12].png~SCALE([72~143],[144~215]):50"
            alpha=0~1,1,1,1~0
            image_mod="~CS(-31,-255,-31)"
            y=0~-200
            auto_vflip=no
        [/smoke_3_frame]
    [/animation]

    [animation]
        apply_to=attack
        [filter_attack]
            name=ravanal_shadow_wave
        [/filter_attack]

        start_time=-750
        offset=0.0
        halo1_start_time=-750
        halo2_start_time=-600
        halo3_start_time=-500
        halo4_start_time=-400
        halo5_start_time=-200

        [halo1_frame]
            image="halo/elven/nature-halo[8~1].png~CS(-160,-240,-170):100"
            offset=1.0
            layer=60
        [/halo1_frame]

        [halo2_frame]
            image="halo/elven/shyde-stationary-halo[1~6].png~CS(-160,-240,-170):100"
            offset=0.0
            layer=41
        [/halo2_frame]

        [halo3_frame]
            image="halo/elven/nature-halo[1~8].png~CS(-160,-240,-170):75"
            offset=0.0
            alpha=0.7
            layer=41
        [/halo3_frame]

        [halo4_frame]
            image="halo/elven/ice-halo[1~8].png~CS(-150,-205,-160):100"
            alpha=0.0~1.0:300,1.0~0.0:400
            offset=1.0
            y=-5
            layer=60
        [/halo4_frame]

        [if]
            hits=yes
            [halo5_frame]
                duration=1
            [/halo5_frame]
            [halo5_frame]
                image="projectiles/whitemissile-impact-[1~8].png~CS(30,-40,-10):[50*4,100*4]"
                offset=1.0
                alpha=0.6
                y=-5
                layer=60
            [/halo5_frame]
            [halo5_frame]
                duration=1
            [/halo5_frame]
        [/if]

        [frame]
            image="units/undead-necromancers/ancient-lich-magic-1.png:850"
        [/frame]
        {SOUND:HIT_AND_MISS magic-dark-big.ogg magic-dark-big-miss.ogg 0}
        [frame]
            image="units/undead-necromancers/ancient-lich.png:250"
        [/frame]
    [/animation]
[/unit_type]
