#textdomain wesnoth-units
[unit_type]
    id=Silver Mage
    name= _ "Silver Mage"
    race=human
    gender=male,female
    image="units/human-magi/silver-mage.png"
    profile="portraits/humans/mage-silver.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=48
    movement_type=smallfoot
    movement=6
    experience=150
    level=3
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=59
    usage=mixed fighter
    description= _ "The many paths that a mage can take in study lead to strikingly different ends. Often viewed as sages, or wandering mystics, silver magi act under an agenda which is obscure even to their own colleagues. Though helpful to the magisteriums which often employ them in the field, they remain somewhat aloof.

They have, in fact, their own order amongst the ranks of magi, an order which withholds certain secrets from their peers. One of these is an apparent ability to cross great distances, faster than one could possibly travel on foot. Members of the silver order ardently refuse to discuss the workings of this with any of their fellow magi, and on those rare occasions when others have pried into their work, they have abandoned the endeavor, never to speak of it again.

Silver magi are often more physically adept than other magi, and their skills are of undeniable use on the battlefield, if one can manage to induce the mage to apply them."+{SPECIAL_NOTES}+_"SPECIAL_NOTE^ Silver Magi are well-attuned to their magical natures and are highly resistant to non-physical damage."+{SPECIAL_NOTES_MAGICAL}+{SPECIAL_NOTES_TELEPORT}
    die_sound={SOUND_LIST:HUMAN_DIE}
    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/humans/transparent/mage-silver.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/humans/transparent/mage-silver.png"
    [/portrait]
    [resistance]
        fire=50
        cold=50
    [/resistance]
    [abilities]
        {ABILITY_TELEPORT}
    [/abilities]
    {DEFENSE_ANIM "units/human-magi/silver-mage-defend.png" "units/human-magi/silver-mage.png" {SOUND_LIST:HUMAN_OLD_HIT} }
    [attack]
        name=staff
        description=_"staff"
        icon=attacks/staff-magic.png
        type=impact
        range=melee
        damage=7
        number=2
    [/attack]
    [attack]
        name=missile
        description=_"missile"
        icon=attacks/magic-missile.png
        type=fire
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=9
        number=4
    [/attack]
    [attack_anim]
        [filter_attack]
            name=missile
        [/filter_attack]

        offset=0

        {MAGIC_MISSILE 14 -23}
        {MAGIC_MISSILE_STAFF_FLARE -750 600 14 -23}

        [frame]
            begin=-800
            end=-700
            image="units/human-magi/silver-mage-attack-magic1.png"
        [/frame]
        [frame]
            begin=-700
            end=-350
            image="units/human-magi/silver-mage-attack-magic2.png"
        [/frame]
        [if]
            hits=no
            [frame]
                begin=-350
                end=-100
                image="units/human-magi/silver-mage-attack-magic2.png"
                sound=magic-missile-1-miss.ogg,magic-missile-2-miss.ogg,magic-missile-3-miss.ogg
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                begin=-350
                end=-100
                image="units/human-magi/silver-mage-attack-magic2.png"
                sound=magic-missile-1.ogg,magic-missile-2.ogg,magic-missile-3.ogg
            [/frame]
        [/else]
        [frame]
            begin=-100
            end=100
            image="units/human-magi/silver-mage-attack-magic1.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=staff
        [/filter_attack]
        [frame]
            begin=-250
            end=-200
            image="units/human-magi/silver-mage.png"
        [/frame]
        [frame]
            begin=-200
            end=-100
            image="units/human-magi/silver-mage-attack-staff1.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/human-magi/silver-mage-attack-staff2.png"
                sound=staff.wav
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/human-magi/silver-mage-attack-staff2.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=175
            image="units/human-magi/silver-mage-attack-magic1.png"
        [/frame]
        [frame]
            begin=175
            end=250
            image="units/human-magi/silver-mage.png"
        [/frame]
    [/attack_anim]
    [animation]
        apply_to=pre_teleport
        start_time=-1200

        teleport_sparkle_1_start_time=-1200
        teleport_sparkle_2_start_time=-1000
        teleport_sparkle_3_start_time=-800

        [teleport_sparkle_1_frame]
            duration=800
            halo=misc/blank-hex.png:1,halo/teleport-9.png,halo/teleport-8.png,halo/teleport-1.png,halo/teleport-2.png,halo/teleport-3.png,halo/teleport-4.png,halo/teleport-5.png,halo/teleport-6.png,halo/teleport-7.png,halo/teleport-8.png,halo/teleport-9.png,misc/blank-hex.png:1
            halo_x=-10
            halo_y=30~-30
        [/teleport_sparkle_1_frame]
        [teleport_sparkle_2_frame]
            duration=800
            halo=misc/blank-hex.png:1,halo/teleport-9.png,halo/teleport-8.png,halo/teleport-1.png,halo/teleport-2.png,halo/teleport-3.png,halo/teleport-4.png,halo/teleport-5.png,halo/teleport-6.png,halo/teleport-7.png,halo/teleport-8.png,halo/teleport-9.png,misc/blank-hex.png:1
            halo_x=0
            halo_y=40~-40
        [/teleport_sparkle_2_frame]
        [teleport_sparkle_3_frame]
            duration=800
            halo=misc/blank-hex.png:1,halo/teleport-9.png,halo/teleport-8.png,halo/teleport-1.png,halo/teleport-2.png,halo/teleport-3.png,halo/teleport-4.png,halo/teleport-5.png,halo/teleport-6.png,halo/teleport-7.png,halo/teleport-8.png,halo/teleport-9.png,misc/blank-hex.png:1
            halo_x=10
            halo_y=30~-30
        [/teleport_sparkle_3_frame]

        [frame]
            duration=200
            image="units/human-magi/silver-mage-teleport-1.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-magi/silver-mage-teleport-2.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-magi/silver-mage-teleport-3.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-magi/silver-mage-teleport-4.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-magi/silver-mage-teleport-5.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-magi/silver-mage-teleport-6.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-magi/silver-mage-teleport-7.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-magi/silver-mage-teleport-8.png"
        [/frame]
        [frame]
            duration=300
            image="misc/blank-hex.png"
        [/frame]
    [/animation]

    [animation]
        apply_to=post_teleport
        start_time=-1200

        teleport_sparkle_1_start_time=-1200
        teleport_sparkle_2_start_time=-1000
        teleport_sparkle_3_start_time=-800

        [teleport_sparkle_1_frame]
            duration=800
            halo=misc/blank-hex.png:1,halo/teleport-9.png,halo/teleport-8.png,halo/teleport-1.png,halo/teleport-2.png,halo/teleport-3.png,halo/teleport-4.png,halo/teleport-5.png,halo/teleport-6.png,halo/teleport-7.png,halo/teleport-8.png,halo/teleport-9.png,misc/blank-hex.png:1
            halo_x=10
            halo_y=-30~30
        [/teleport_sparkle_1_frame]
        [teleport_sparkle_2_frame]
            duration=800
            halo=misc/blank-hex.png:1,halo/teleport-9.png,halo/teleport-8.png,halo/teleport-1.png,halo/teleport-2.png,halo/teleport-3.png,halo/teleport-4.png,halo/teleport-5.png,halo/teleport-6.png,halo/teleport-7.png,halo/teleport-8.png,halo/teleport-9.png,misc/blank-hex.png:1
            halo_x=0
            halo_y=-40~40
        [/teleport_sparkle_2_frame]
        [teleport_sparkle_3_frame]
            duration=800
            halo=misc/blank-hex.png:1,halo/teleport-9.png,halo/teleport-8.png,halo/teleport-1.png,halo/teleport-2.png,halo/teleport-3.png,halo/teleport-4.png,halo/teleport-5.png,halo/teleport-6.png,halo/teleport-7.png,halo/teleport-8.png,halo/teleport-9.png,misc/blank-hex.png:1
            halo_x=-10
            halo_y=-30~30
        [/teleport_sparkle_3_frame]
        [frame]
            duration=300
            image="misc/blank-hex.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-magi/silver-mage-teleport-8.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-magi/silver-mage-teleport-7.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-magi/silver-mage-teleport-6.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-magi/silver-mage-teleport-5.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-magi/silver-mage-teleport-4.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-magi/silver-mage-teleport-3.png"
        [/frame]
        [frame]
            duration=100
            image="units/human-magi/silver-mage-teleport-2.png"
        [/frame]
        [frame]
            duration=200
            image="units/human-magi/silver-mage-teleport-1.png"
        [/frame]
    [/animation]
    [female]
        name= _ "female^Silver Mage"
        gender=female
        image="units/human-magi/silver-mage+female.png"
        profile="portraits/humans/mage-silver+female.png"
        die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}
        {DEFENSE_ANIM "units/human-magi/silver-mage+female-defend.png" "units/human-magi/silver-mage+female.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
        # Upon Kitty's request only on the left side.
        [portrait]
            size=400
            side="left"
            mirror="false"
            image="portraits/humans/transparent/mage-silver+female.png"
        [/portrait]
        # Single sided portraits are not properly supported yet so use an
        # invalid image to override the inherited version.
        [portrait]
            size=400
            side="right"
            mirror="true"
            image=" "
        [/portrait]
        [attack_anim]
            [filter_attack]
                name=missile
            [/filter_attack]
            offset=0
            {MAGIC_MISSILE 14 -23}
            {MAGIC_MISSILE_STAFF_FLARE -750 600 14 -23}
            [frame]
                image="units/human-magi/silver-mage+female-attack-magic1.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-attack-magic2.png"
            [/frame]
            [if]
                [frame]
                    image="units/human-magi/silver-mage+female-attack-magic2.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    image="units/human-magi/silver-mage+female-attack-magic2.png"
                [/frame]
            [/else]
            [frame]
                image="units/human-magi/silver-mage+female-attack-magic1.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=staff
            [/filter_attack]
            [frame]
                image="units/human-magi/silver-mage+female.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-attack-staff1.png"
            [/frame]
            [if]
                [frame]
                    image="units/human-magi/silver-mage+female-attack-staff2.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    image="units/human-magi/silver-mage+female-attack-staff2.png"
                [/frame]
            [/else]
            [frame]
                image="units/human-magi/silver-mage+female-attack-magic1.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female.png"
            [/frame]
        [/attack_anim]
        [animation]
            apply_to=pre_teleport
            [frame]
                image="units/human-magi/silver-mage+female-teleport-1.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-2.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-3.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-4.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-5.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-6.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-7.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-8.png"
            [/frame]
            [frame]
            [/frame]
        [/animation]

        [animation]
            apply_to=post_teleport
            [frame]
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-8.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-7.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-6.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-5.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-4.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-3.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-2.png"
            [/frame]
            [frame]
                image="units/human-magi/silver-mage+female-teleport-1.png"
            [/frame]
        [/animation]
    [/female]
[/unit_type]
