#textdomain wesnoth-thot
# Version that lacks stuff that screams "LICH!"
# This is meant to be used before it is revealed that Karrag is a lich
[unit_type]
    id=Dwarvish Rune Lord
    #textdomain wesnoth-units
    name= _ "Dwarvish Runemaster"
    race=dwarf
    image=units/karrag.png
    hitpoints=48
    movement_type=dwarvishfoot
    [resistance]
        blade=50
        pierce=60
        impact=60
    [/resistance]
    movement=4
    level=3
    alignment=neutral
    cost=50
    usage=fighter
    experience=150
    advances_to=null
    {AMLA_DEFAULT}
    hide_help=yes
    do_not_list=yes
    description= _ "Except for those with almost supernatural skill, the highest rank a runecrafter can rise to is that of the Dwarvish Runemaster. Striking blows nearly as powerful as those of the best warriors, they would be fearsome without their craft, but with it they are also nigh on invincible, since their runes cause the physical blows of their enemies to deal less damage than would be expected."+{SPECIAL_NOTES}+{SPECIAL_NOTES_MAGICAL}
    {DEFENSE_ANIM "units/karrag-defend.png" "units/karrag.png" {SOUND_LIST:DWARF_HIT} }
    die_sound={SOUND_LIST:DWARF_DIE}
    [attack]
        name=hammer
        description= _"hammer"
        #textdomain wesnoth-thot
        icon=attacks/hammer-dwarven-runic.png
        type=impact
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        range=melee
        damage=18
        number=2
    [/attack]
    [attack_anim]
        [filter_attack]
            name=hammer
        [/filter_attack]

        start_time=-400
        offset=0.0~-0.17,-0.17~-0.25,-0.25~0.0,-0.0~0.8,0.8~0.4,0.4~0.0

        [frame]
            image=units/karrag-attack[1~4].png:[100*3,200]
            halo=halo/karrag-attack[1~4]_halo.png:[100*3,200]
        [/frame]
        {SOUND:HIT_AND_MISS mace.ogg mace-miss.ogg -100}
        [frame]
            image=units/karrag.png:100
            halo=halo/karrag_halo.png:100
        [/frame]
    [/attack_anim]
    [standing_anim]
        [frame]
            image=units/karrag.png:100
            halo=halo/karrag_halo.png
        [/frame]
    [/standing_anim]
[/unit_type]

# This is a customized Dwarvish Runemaster with a chill tempest
# attack like the L3 Lich, and its own animations.
[unit_type]
    [base_unit]
        id=Dwarvish Rune Lord
    [/base_unit]
    id=Undead Dwarvish Rune Lord
    hide_help=no
    do_not_list=no
    #textdomain wesnoth-units
    description= _ "Except for those with almost supernatural skill, the highest rank a runecrafter can rise to is that of the Dwarvish Runemaster. Striking blows nearly as powerful as those of the best warriors, they would be fearsome without their craft, but with it they are also nigh on invincible, since their runes cause the physical blows of their enemies to deal less damage than would be expected."+{SPECIAL_NOTES}+{SPECIAL_NOTES_MAGICAL}+{SPECIAL_NOTES_ARCANE}
    {DEFENSE_ANIM "units/karrag-defend.png" "units/karrag.png" {SOUND_LIST:LICH_HIT} }
    die_sound=lich-die.ogg
    # empty attack tag to prevent overwriting the hammer attack
    [attack]
    [/attack]
    [attack_anim]
    [/attack_anim]
    [attack]
        name=chill tempest
        description=_"chill tempest"
        type=cold
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        range=ranged
        damage=12
        number=3
        icon=attacks/iceball.png
    [/attack]
    [attack]
        name=shadow wave
        description=_"shadow wave"
        #textdomain wesnoth-thot
        type=arcane
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        range=ranged
        damage=9
        number=3
        icon=attacks/dark-missile.png
    [/attack]
    [attack_anim]
        [filter_attack]
            name=shadow wave
        [/filter_attack]
        {MISSILE_FRAME_SHADOW_WAVE}
        offset=0
        start_time=-600
        [frame]
            image=units/karrag-ranged[1~3].png:[50*2,100]
            halo=halo/karrag-ranged[1~4]_halo.png:50
        [/frame]
        [frame]
            image=units/karrag-ranged3.png:50
        [/frame]
        [frame]
            image=units/karrag-ranged3.png
            halo=halo/karrag-ranged[5~10]_halo.png:[50*5,100]
        [/frame]
        {SOUND:HIT_AND_MISS magic-dark-big.ogg magic-dark-miss.ogg -250}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=chill tempest
        [/filter_attack]
        {MISSILE_FRAME_CHILL_WAVE 30 0}
        offset=0
        start_time=-600
        [frame]
            image=units/karrag-ranged[1~3].png:[50*2,100]
            halo=halo/karrag-ranged[1~4]_halo.png:50
        [/frame]
        [frame]
            image=units/karrag-ranged3.png:50
        [/frame]
        [frame]
            image=units/karrag-ranged3.png
            halo=halo/karrag-ranged[5~10]_halo.png:[50*5,100]
        [/frame]
        {SOUND:HIT_AND_MISS magic-dark-big.ogg magic-dark-miss.ogg -250}
    [/attack_anim]
    [idle_anim]
        {STANDARD_IDLE_FILTER}
        start_time=0
        [frame]
            duration=110
            image=units/karrag.png
            halo=halo/undead/idle-flash-[1~21].png
            halo_x, halo_y=8,-2
        [/frame]
        [frame]
            image=units/karrag.png:110
            halo=halo/karrag_halo.png
        [/frame]
    [/idle_anim]
    [variation]
        variation_id=karrag-unmasked
        inherit=yes
        image=units/karrag-unmasked.png
        [standing_anim]
            [frame]
                image=units/karrag-unmasked.png:100
            [/frame]
        [/standing_anim]
    [/variation]
[/unit_type]
