#textdomain wesnoth-units
[unit_type]
    id=Elder Mage
    name= _ "Elder Mage"
    race=human
    image="units/human-magi/elder-mage.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    {DEFENSE_ANIM "units/human-magi/elder-mage-defend.png" "units/human-magi/elder-mage.png" {SOUND_LIST:HUMAN_OLD_HIT} }
    hitpoints=60
    movement_type=smallfoot
    [resistance]
        fire=80
    [/resistance]
    movement=6
    experience=250
    level=5
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=65
    usage=mixed fighter
    die_sound={SOUND_LIST:HUMAN_OLD_DIE}
    description= _ "Once great, Elder Magi have seen their power a little diminished from wearying years of battle. Nevertheless they remain feared on the battlefield on account of their powerful lightning bolts."+{SPECIAL_NOTES}+{SPECIAL_NOTES_MAGICAL}
    [attack]
        name=staff
        description= _"staff"
        icon=attacks/staff-magic.png
        type=impact
        range=melee
        damage=8
        number=2
    [/attack]
    [attack]
        name=lightning
        description= _"lightning"
        icon=attacks/lightning.png
        type=fire
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=14
        number=4
    [/attack]

    [attack_anim]
        [filter_attack]
            name=staff
        [/filter_attack]
        start_time=-225
        [frame]
            image="units/human-magi/elder-mage-ranged1.png:25"
        [/frame]
        [frame]
            image="units/human-magi/elder-mage-melee[1~2].png:[100,200]"
        [/frame]
        {SOUND:HIT_AND_MISS staff.wav {SOUND_LIST:MISS} -100}
        [frame]
            image="units/human-magi/elder-mage-ranged1.png:50"
        [/frame]
        [frame]
            image="units/human-magi/elder-mage.png:50"
        [/frame]
    [/attack_anim]

#define ELDER_MAGE_LIGHTNING DIRECTION_NUMBER
    [attack_anim]
        [filter_attack]
            name=lightning
        [/filter_attack]

        {LIGHTNING_BOLT {DIRECTION_NUMBER} }

        start_time=-300
        {SOUND:HIT_AND_MISS lightning.ogg lightning-miss.ogg -300}
        [frame]
            image="units/human-magi/elder-mage-ranged[1~3,2,1].png:[100*2,200,100,50]"
        [/frame]
    [/attack_anim]
#enddef

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