#textdomain wesnoth-ei

#
# Dacyn is more-or-less the ideal unit to fight Mal-Ravanal with (though he can't do it solo)
# Dacyn's immune to Mal-Ravanal's terror (bc level 5), immune to Mal-Ravanal's drain (bc rotting), and does a ton of arcane damage
#

[unit_type]
    id=Fallen Mage
    name= _ "Fallen Mage"
    race=human
    gender=male
    image="units/dacyn/dacyn-L5.png"
    profile="portraits/dacyn.webp"
    hitpoints=47
    movement_type=smallfoot
    movement=5
    experience=250
    level=5 # means he ignores both gweddry's and the king's leadership
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=80
    usage=healer
    description= _ "There are dark powers in this world which humankind was not meant to understand. Even the greatest and wisest can be bound in service of such a darkness."
    die_sound=lich-die.ogg
    {DEFENSE_ANIM "units/dacyn/dacyn-L5-defend1.png" "units/dacyn/dacyn-L5-defend2.png" {SOUND_LIST:HUMAN_OLD_HIT} }
    [resistance]
        arcane=130
        cold=70
    [/resistance]

    halo=halo/darkens-aura.png~BLIT("halo/elven/nature-halo[7~1].png~CS(-159,-255,-159)~O(0.5)",60,60):250
    [standing_anim]
        {FRAME_DELAY 1000}
        {IDLE_LIGHTNING_FRAMES B[1~9]   "~O(0.7)~GS()"                } # MED ground
        {IDLE_LIGHTNING_FRAMES E[2,1,5] "~O(0.7)~GS()~FL(vertical)"   } # SML staff 2
        {FRAME_DELAY 500}
        {IDLE_LIGHTNING_FRAMES C[1~8]   "~O(0.7)~GS()~FL(vertical)"   } # LRG staff
        {FRAME_DELAY 1000}

        {IDLE_LIGHTNING_FRAMES  [1~4]   "~O(0.7)~GS()~FL(horizontal)" } # SML ground LEFT
        {IDLE_LIGHTNING_FRAMES B[1~9]   "~O(0.7)~GS()~FL(horizontal)" } # MED ground LEFT
        {FRAME_DELAY 500}
        {IDLE_LIGHTNING_FRAMES  [1~21]  "~O(0.7)~GS()~FL(horizontal)" } # LRG ground LEFT
        {FRAME_DELAY 1000}

        {IDLE_LIGHTNING_FRAMES A[1~5]   "~O(0.7)~GS()~FL(vertical)"   } # MED staff
        {IDLE_LIGHTNING_FRAMES C[1~8]   "~O(0.7)~GS()~FL(vertical)"   } # LRG staff
        {FRAME_DELAY 1000}

        {IDLE_LIGHTNING_FRAMES  [1~21]  "~O(0.7)~GS()"                } # LRG ground
        {IDLE_LIGHTNING_FRAMES  [1~4]   "~O(0.7)~GS()~FL(horizontal)" } # SML ground LEFT
        {FRAME_DELAY 1000}

        {IDLE_LIGHTNING_FRAMES A[2,1,5] "~O(0.7)~GS()~FL(vertical)"   } # SML staff
        {IDLE_LIGHTNING_FRAMES E[1~5]   "~O(0.7)~GS()~FL(vertical)"   } # MED staff 2
    [/standing_anim]

    [abilities]
        {ABILITY_DARKENS}
        [dummy]
            name= _ "rotting" # this ability is actually implemented a hidden trait, which is added in S17 when Dacyn becomes a fallen mage
            description= _ "Immune to poison, drain, and plague."
        [/dummy]
    [/abilities]

    [attack]
        name=touch
        #textdomain wesnoth-units
        description= _ "touch"
        icon=attacks/touch-undead.png
        type=arcane
        [specials]
            {WEAPON_SPECIAL_DRAIN}
        [/specials]
        range=melee
        damage=8
        number=5
    [/attack]
    [attack]
        name=shadow wave
        description= _ "shadow wave"
        #textdomain wesnoth-ei
        icon=attacks/dark-missile.png
        type=arcane
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        range=ranged
        damage=9
        number=5
    [/attack]
    [attack_anim]
        [filter_attack]
            name=shadow wave
        [/filter_attack]
        {MISSILE_FRAME_SHADOW_WAVE}
        start_time=-675
        {SOUND:HIT_AND_MISS magic-twilight.ogg magic-twilight-miss.ogg -500}
        [frame]
            image="units/dacyn/dacyn-L5-magic-[1,2].png:75"
        [/frame]
        [frame]
            image="units/dacyn/dacyn-L5-magic-3.png"
            halo=halo/holy/halo[6,1,3,5,6].png:[75*4,50]
        [/frame]
        [frame]
            image="units/dacyn/dacyn-L5-magic-[2,1].png:50"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=touch
        [/filter_attack]
        start_time=-250
        [frame]
            image="units/dacyn/dacyn-L5.png:50"
        [/frame]
        [frame]
            image="units/dacyn/dacyn-L5-touch.png:300"
        [/frame]
        {SOUND:HIT_AND_MISS wail-sml.wav {SOUND_LIST:MISS} -100}
        [frame]
            image="units/dacyn/dacyn-L5.png:75"
        [/frame]
    [/attack_anim]

    {LIGHTNING_ANIMATION_DACYN 1}
    {LIGHTNING_ANIMATION_DACYN 2}
    {LIGHTNING_ANIMATION_DACYN 3}

    {LIGHTNING_ANIMATION_DACYN_SELF 1}
    {LIGHTNING_ANIMATION_DACYN_SELF 2}
    {LIGHTNING_ANIMATION_DACYN_SELF 3}
[/unit_type]
