#textdomain wesnoth-units
[unit_type]
    id=Dwarvish Runemaster
    name= _ "Dwarvish Runemaster"
    # wmllint: general spelling runemaster runemasters
    race=dwarf
    image="units/dwarves/runemaster.png"
    profile="portraits/dwarves/runemaster.png"
    {MAGENTA_IS_THE_TEAM_COLOR}
    hitpoints=75
    movement_type=dwarvishfoot
    movement=5
    experience=150
    level=3
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    undead_variation=dwarf
    cost=60
    usage=fighter
    description= _ "Dwarven magic most often manifests itself by the inscription of runes in the surface of an object, which by their mere presence somehow imbue it with power. Though rarely seen in combat, a master of these runes can put them to terrifying use."+{SPECIAL_NOTES}+{SPECIAL_NOTES_MAGICAL}
    die_sound={SOUND_LIST:DWARF_DIE}
    {DEFENSE_ANIM "units/dwarves/runemaster-defend.png" "units/dwarves/runemaster.png" {SOUND_LIST:DWARF_HIT} }
    [portrait]
        size=400
        side="left"
        mirror="false"
        image="portraits/dwarves/transparent/runemaster.png"
    [/portrait]
    [portrait]
        size=400
        side="right"
        mirror="true"
        image="portraits/dwarves/transparent/runemaster.png"
    [/portrait]
    [attack]
        name=runic hammer
        description=_"runic hammer"
        type=impact
        range=melee
        damage=14
        number=3
        icon=attacks/hammer-dwarven-runic.png
    [/attack]
    [attack]
        name=lightning bolt
        description=_"lightning bolt"
        icon=attacks/lightning.png
        type=fire
        range=ranged
        damage=14
        number=2
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]
    [idle_anim]
        {STANDARD_IDLE_FILTER}
        start_time=0
        [frame]
            duration=100
            image="units/dwarves/runemaster-idle-1.png"
        [/frame]
        [frame]
            duration=100
            image="units/dwarves/runemaster-idle-2.png"
        [/frame]
        [frame]
            duration=100
            image="units/dwarves/runemaster-idle-3.png"
        [/frame]
        [frame]
            duration=200
            image="units/dwarves/runemaster-idle-4.png"
        [/frame]
        [frame]
            duration=100
            image="units/dwarves/runemaster-idle-6.png"
        [/frame]
        [frame]
            duration=100
            image="units/dwarves/runemaster-idle-7.png"
        [/frame]
        [frame]
            duration=200
            image="units/dwarves/runemaster-idle-4.png"
        [/frame]
        [frame]
            duration=100
            image="units/dwarves/runemaster-idle-6.png"
        [/frame]
        [frame]
            duration=100
            image="units/dwarves/runemaster-idle-7.png"
        [/frame]
        [frame]
            duration=600
            image="units/dwarves/runemaster-idle-4.png"
        [/frame]
        [frame]
            duration=100
            image="units/dwarves/runemaster-idle-5.png"
        [/frame]
        [frame]
            duration=300
            image="units/dwarves/runemaster-idle-4.png"
        [/frame]
        [frame]
            duration=100
            image="units/dwarves/runemaster-idle-2.png"
        [/frame]
        [frame]
            duration=100
            image="units/dwarves/runemaster-idle-1.png"
        [/frame]
    [/idle_anim]
    [attack_anim]
        [filter_attack]
            name=runic hammer
        [/filter_attack]
        [frame]
            begin=-300
            end=-200
            image=units/dwarves/runemaster-attack1.png
        [/frame]
        [frame]
            begin=-200
            end=-100
            image=units/dwarves/runemaster-attack2.png
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image=units/dwarves/runemaster-attack3.png
                sound=mace.wav
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image=units/dwarves/runemaster-attack3.png
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
    [/attack_anim]
#define RUNEMASTER_LIGHTNING DIRECTION_NUMBER
    [attack_anim]
        [filter_attack]
            name=lightning bolt
        [/filter_attack]

        {LIGHTNING_BOLT {DIRECTION_NUMBER} }

        start_time=-250
        [if]
            hits=yes
            [frame]
                duration=50
                image="units/dwarves/runemaster.png"
                sound=lightning.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=50
                image="units/dwarves/runemaster.png"
                sound=lightning-miss.ogg
            [/frame]
        [/else]
        [frame]
            duration=100
            image="units/dwarves/runemaster-attack1.png"
        [/frame]
        [frame]
            duration=100
            image="units/dwarves/runemaster-attack2.png"
        [/frame]
        [frame]
            duration=100
            image="units/dwarves/runemaster-attack1.png"
        [/frame]
        [frame]
            duration=50
            image="units/dwarves/runemaster.png"
        [/frame]
    [/attack_anim]
#enddef

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