#textdomain wesnoth-After_the_Storm

#ifdef CAMPAIGN_AFTER_THE_STORM_EPISODE_III
[unit_type]
    id=Demon Messenger
    name= _ "female^Demoness Messenger"
    race=demon
    gender=female
    image="units/demons/messenger.png"
    #profile="portraits/demon-messenger.png"
    hitpoints=28
    movement_type=demonfoot
    movement=6
    experience=50
    level=1
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=16
    usage=fighter
    {TRAIT_DEXTROUS}
    hide_help=yes
    description= _ "Demons without any remarkable fighting skills who survive to adulthood are often employed for more menial tasks. In spite of their condition as slaves of their lords, messengers who can endure all kinds of hazards and serve with unconditional devotion—even if that may require taking their own lives—are a valuable resource in times of war when communication by magic means may fail or be intercepted by the enemy."
    die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}
    {DEFENSE_ANIM "units/demons/messenger.png" "units/demons/messenger.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
    [attack]
        name=claws
        description={TSTR_ATTACK_NAME_CLAWS}
        icon=attacks/claws-flaming.png
        type=blade
        range=melee
        damage=5
        number=3
    [/attack]
    [attack]
        name=fireball
        description={TSTR_ATTACK_NAME_FIREBALL}
        type=fire
        range=ranged
        damage=5
        number=2
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        start_time=-200
        [frame]
            duration=100
            image="units/demons/messenger.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=200
                image="units/demons/messenger.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=200
                image="units/demons/messenger.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=100
            image="units/demons/messenger.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=fireball
        [/filter_attack]
        {MISSILE_FRAME_FIREBALL_XY 0 0}
        start_time=-250
        [frame]
            duration=75
            image="units/demons/messenger.png"
        [/frame]
        [frame]
            duration=125
            image="units/demons/messenger.png"
            sound=fire.wav
        [/frame]
        [frame]
            duration=100
            image="units/demons/messenger.png"
        [/frame]
        [frame]
            duration=150
            image="units/demons/messenger.png"
        [/frame]
    [/attack_anim]
[/unit_type]
#endif

# kate: indent-mode normal; encoding utf-8; space-indent on;


#textdomain wesnoth-After_the_Storm

#ifndef CAMPAIGN_AFTER_THE_STORM_EPISODE_I
[unit_type]
    id=Demon Spelldancer
    name= _ "female^Demoness Spelldancer"
    race=demon
    gender=female
    image="units/demons/spelldancer.png"
    hitpoints=53
    movement_type=demonfly
    movement=6
    experience=150
    level=3
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=48
    usage=healer
    {TRAIT_DEXTROUS}
    [abilities]
        {ABILITY_LEADERSHIP}
        {ABILITY_HEALS}
        {ABILITY_SKIRMISHER}
    [/abilities]
    description= _ "It is very rare for this demon species at large to dabble in the intricacies of the various types of magic, having adapted their body structure over time for feats of physical strength, much in the same vein as their distant cousins, the Valdemons. The endless wars waged in their homeworld during the Era of Strife have also contributed to a general scarcity of knowledge and those capable of spreading it.

In spite—or perhaps because—of this, the few individuals who attain control of those otherworldly powers not naturally available to them are respected by their people as the great spell-masters they strive to be."
    {DEFENSE_ANIM "units/demons/spelldancer.png" "units/demons/spelldancer.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
    die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}
    [attack]
        name=blazing grasp
        description= _ "blazing grasp"
        icon=attacks/claws-flaming.png
        type=fire
        range=melee
        damage=8
        number=2
    [/attack]
    [attack]
        name=shadow wave
        description={TSTR_ATTACK_NAME_SHADOW_WAVE}
        icon=attacks/dark-missile.png
        type=arcane
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=10
        number=3
    [/attack]
    [attack_anim]
        [filter_attack]
            name=blazing grasp
        [/filter_attack]
        start_time=-200
        {MELEE_FRAME_FIRE_AURA "units/demons/spelldancer.png" "units/demons/spelldancer.png" melee-fire.ogg}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=shadow wave
        [/filter_attack]
        start_time=-300
        missile_start_time=-50

        [missile_frame]
            duration=200
            image="projectiles/darkmissile-n.png"
            image_diagonal="projectiles/darkmissile-ne.png"
        [/missile_frame]

        [frame]
            duration=50
            image="units/demons/spelldancer.png"
            halo=halo/undead/dark-magic-1.png
            halo_x,halo_y=10,15
        [/frame]
        [frame]
            duration=50
            image="units/demons/spelldancer.png"
            halo=halo/undead/dark-magic-2.png
            halo_x,halo_y=10,15
        [/frame]
        [frame]
            duration=50
            image="units/demons/spelldancer.png"
            halo=halo/undead/dark-magic-3.png
            halo_x,halo_y=10,15
        [/frame]
        [frame]
            duration=50
            image="units/demons/spelldancer.png"
            halo=halo/undead/dark-magic-4.png
            halo_x,halo_y=10,15
        [/frame]
        [frame]
            duration=50
            image="units/demons/spelldancer.png"
            halo=halo/undead/dark-magic-5.png
            halo_x,halo_y=10,15
        [/frame]
        [if]
            hits=no
            [frame]
                duration=50
                image="units/demons/spelldancer.png"
                halo=halo/undead/dark-magic-6.png
                halo_x,halo_y=10,15
                sound=magic-dark-miss.ogg
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                duration=50
                image="units/demons/spelldancer.png"
                halo=halo/undead/dark-magic-6.png
                halo_x,halo_y=10,15
                sound=magic-dark.ogg
            [/frame]
        [/else]
        [frame]
            duration=100
            image="units/demons/spelldancer.png"
        [/frame]
    [/attack_anim]
[/unit_type]
#endif

# kate: indent-mode normal; encoding utf-8; space-indent on;


#textdomain wesnoth-After_the_Storm

#ifdef CAMPAIGN_AFTER_THE_STORM_EPISODE_III
[unit_type]
    id=Gatekeeper
    name= _ "female^Gatekeeper"
    race=demon
    gender=female
    ignore_race_traits=yes
    image="units/demons/gatekeeper-ethea.png"
    profile="units/demons/gatekeeper-ethea.png~CROP(0,43,142,146)"
    bar_offset_x,bar_offset_y=-99999,-99999 # offscreen
    hitpoints=990
    movement_type=none
    [defense]
        deep_water=0
        shallow_water=0
        swamp_water=0
        reef=0
        flat=0
        sand=0
        forest=0
        hills=0
        mountains=0
        village=0
        castle=0
        cave=0
        frozen=0
        unwalkable=0
        impassable=0
        fungus=0
    [/defense]
    [resistance]
        blade=0
        pierce=0
        impact=0
        fire=0
        cold=0
        arcane=100
    [/resistance]
    movement=1
    {NO_EXPERIENCE_UNIT}
    level=10
    alignment=chaotic
    cost=1000
    usage=archer
    undead_variation=null
    [abilities]
        {ABILITY_REGENERATES}
    [/abilities]
    hide_help=yes
    description= _ "There is no information available about this class of beings at this time."
    die_sound={SOUND_LIST:MATRIX_DIE}
[/unit_type]
#endif

# kate: indent-mode normal; encoding utf-8; space-indent on;


#textdomain wesnoth-After_the_Storm

#ifdef CAMPAIGN_AFTER_THE_STORM_EPISODE_III
[unit_type]
    id=Guardian of Life Uria
    name= _ "female^Guardian of Life"
    race=demon
    gender=female
    image="units/demons/guardian-of-life-uria.png"
    bar_offset_x,bar_offset_y=0,0
    # Fixes unit sprite alignment since we don't have a portrait yet.
    profile="units/demons/guardian-of-life-uria.png~CROP(25,20,90,80)"
    hitpoints=613
    movement_type=smallfly
    movement=6
    experience=500
    level=10
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=1180
    usage=healer
    hide_help=true
    undead_variation=null
    [resistance]
        impact=100
    [/resistance]
    [abilities]
        {ABILITY_ASPECT_OF_LIFE}
    [/abilities]
    # wmllint: notecheck off
    description= _ "There is no information available about this class of beings at this time."
    die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}

    {GUARDIAN_DEFENSE_ANIM 255 255 -64 "units/demons/guardian-of-life-uria.png" "units/demons/guardian-of-life-uria.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }

    [attack]
        name=psychic blast
        description= _ "psychic blast"
        icon=attacks/flash-cannon.png
        type=impact
        damage=13
        number=3
        range=melee
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]
    [attack]
        name=breath of thanatos
        description= _ "breath of thanatos" # wmllint: no spellcheck
        icon=attacks/breath-of-thanatos.png
        type=arcane
        damage=28
        number=5
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]

    [variation]
        inherit=yes
        variation_id=powered

        [standing_anim]
            start_time=0
            [frame]
                image="halo/uria-halo.png~BLIT(units/demons/guardian-of-life-uria.png,0,0)"
            [/frame]
        [/standing_anim]
    [/variation]
[/unit_type]
#endif

# kate: indent-mode normal; encoding utf-8; space-indent on;


#textdomain wesnoth-After_the_Storm

#ifdef CAMPAIGN_AFTER_THE_STORM_EPISODE_III
[unit_type]
    id=Lumeril Glyph Mistress
    name= _ "female^Lumeril Glyph Mistress"
    race=demon
    gender=female
    image="units/demons/lumeril-glyph-mistress.png"
    hitpoints=114
    movement_type=demonfly
    [resistances]
        fire=100
        arcane=120
    [/resistances]
    movement=6
    experience=250
    level=5
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=190
    usage=archer
    hide_help=true
    # po: 'Awesome' is used here in the older classical sense of the quality of "inspiring awe".
    description= _ "By combining a meticulous research of history and tradition with an arduous training in the arcane arts, this demon sorceress has attained an unrivaled mastery of the path of Light and the awesome powers it confers upon the the devout. Her ability to summon the records of the ancient to shield herself from the nefarious influence of the unenlightened makes her virtually invincible as a foe."
    die_sound=lich-die.ogg
    {DEFENSE_ANIM "units/demons/lumeril-glyph-mistress.png" "units/demons/lumeril-glyph-mistress.png" {SOUND_LIST:LICH_HIT} }
    [attack]
        name=hand of agathar
        # wmllint: local spelling agathar
        description= _ "hand of agathar"
        type=arcane
        range=melee
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=10
        number=2
        icon=attacks/touch-faerie.png
    [/attack]
    [attack]
        name=lumeril star
        description= _ "lumeril star"
        type=arcane
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=16
        number=3
        icon=attacks/lightbeam.png
    [/attack]
    [attack_anim]
        [filter_attack]
            name=hand of agathar
        [/filter_attack]
        start_time=-240
        sound_start_time=-1

        [sound_frame]
            duration=1
        [/sound_frame]
        [if]
            hits=yes
            [sound_frame]
                sound=fist.ogg
                duration=100
            [/sound_frame]
        [/if]
        [else]
            hits=no
            [sound_frame]
                sound={SOUND_LIST:MISS}
                duration=100
            [/sound_frame]
        [/else]

        [frame]
            duration=240
            image="units/demons/lumeril-glyph-mistress.png"
        [/frame]
        [frame]
            duration=340
            image="units/demons/lumeril-glyph-mistress.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=lumeril star
        [/filter_attack]

        {MISSILE_FRAME_LIGHT_BEAM}

        [frame]
            begin=-300
            end=-225
            halo="halo/lumeril-halo.png~O(0.25)"
            image="units/demons/lumeril-glyph-mistress.png"
        [/frame]
        [frame]
            begin=-225
            end=-150
            halo="halo/lumeril-halo.png~O(0.70)"
            image="units/demons/lumeril-glyph-mistress.png"
        [/frame]
        [frame]
            begin=-150
            end=-75
            halo="halo/lumeril-halo.png"
            image="units/demons/lumeril-glyph-mistress.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-75
                end=0
                halo="halo/lumeril-halo.png"
                image="units/demons/lumeril-glyph-mistress.png"
                sound={SOUND_LIST:HOLY}
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-75
                end=0
                halo="halo/lumeril-halo.png"
                image="units/demons/lumeril-glyph-mistress.png"
                sound={SOUND_LIST:HOLY_MISS}
            [/frame]
        [/else]
        [frame]
            begin=0
            end=75
            halo="halo/lumeril-halo.png"
            image="units/demons/lumeril-glyph-mistress.png"
        [/frame]
        [frame]
            begin=75
            end=150
            halo="halo/lumeril-halo.png~O(0.8)"
            image="units/demons/lumeril-glyph-mistress.png"
        [/frame]

        [frame]
            begin=150
            end=200
            halo="halo/lumeril-halo.png~O(0.6)"
            image="units/demons/lumeril-glyph-mistress.png"
        [/frame]
        [frame]
            begin=200
            end=250
            halo="halo/lumeril-halo.png~O(0.4)"
            image="units/demons/lumeril-glyph-mistress.png"
        [/frame]
        [frame]
            begin=250
            end=300
            halo="halo/lumeril-halo.png~O(0.2)"
            image="units/demons/lumeril-glyph-mistress.png"
        [/frame]
    [/attack_anim]
[/unit_type]
#endif

# kate: indent-mode normal; encoding utf-8; space-indent on;


#textdomain wesnoth-After_the_Storm

#ifdef CAMPAIGN_AFTER_THE_STORM_EPISODE_III
[unit_type]
    id=Lumeril Guard
    name= _ "Lumeril Guard"
    race=demon
    image="units/demons/lumeril-guard.png"
    hitpoints=58
    movement_type=lumerilfoot
    movement=5
    experience=150
    level=3
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=62
    usage=fighter
    description= _ "Members of an ancestral race of warriors of light, these demons now serve as Uria’s elite guards and executioners, imparting her justice with their sharp silver axes."
    die_sound={SOUND_LIST:ORC_DIE}
    {DEFENSE_ANIM "units/demons/lumeril-guard.png" "units/demons/lumeril-guard.png" {SOUND_LIST:ORC_HIT} }
    [attack]
        name=axe
        description={TSTR_ATTACK_NAME_AXE}
        type=blade
        range=melee
        damage=16
        number=3
        icon=attacks/axe-undead.png
    [/attack]
    [attack]
        name=lumeril star
        description= _ "lumeril star"
        type=arcane
        range=ranged
        damage=12
        number=2
        icon=attacks/lightbeam.png
    [/attack]
    [attack_anim]
        [filter_attack]
            name=axe
        [/filter_attack]
        [frame]
            begin=-250
            end=-100
            image="units/demons/lumeril-guard.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/demons/lumeril-guard.png"
                sound=axe.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/demons/lumeril-guard.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=200
            image="units/demons/lumeril-guard.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=lumeril star
        [/filter_attack]

        {MISSILE_FRAME_LIGHT_BEAM}

        [frame]
            begin=-300
            end=-225
            image="units/demons/lumeril-guard.png"
        [/frame]
        [frame]
            begin=-225
            end=-150
            image="units/demons/lumeril-guard.png"
        [/frame]
        [frame]
            begin=-150
            end=-75
            image="units/demons/lumeril-guard.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-75
                end=0
                image="units/demons/lumeril-guard.png"
                sound={SOUND_LIST:HOLY}
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-75
                end=0
                image="units/demons/lumeril-guard.png"
                sound={SOUND_LIST:HOLY_MISS}
            [/frame]
        [/else]
        [frame]
            begin=0
            end=75
            image="units/demons/lumeril-guard.png"
        [/frame]
        [frame]
            begin=75
            end=150
            image="units/demons/lumeril-guard.png"
        [/frame]

        [frame]
            begin=150
            end=200
            image="units/demons/lumeril-guard.png"
        [/frame]
        [frame]
            begin=200
            end=250
            image="units/demons/lumeril-guard.png"
        [/frame]
        [frame]
            begin=250
            end=300
            image="units/demons/lumeril-guard.png"
        [/frame]
    [/attack_anim]
[/unit_type]
#endif

# kate: indent-mode normal; encoding utf-8; space-indent on;


#textdomain wesnoth-After_the_Storm

#ifdef CAMPAIGN_AFTER_THE_STORM_EPISODE_III
[unit_type]
    id=Demon Shapeshifter
    name= _ "Demon Shapeshifter"
    race=demon
    gender=male,female
    image="units/demons/shapeshifter.png"
    hitpoints=44
    movement_type=demonfoot
    movement=6
    experience=100
    level=2
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=58
    usage=fighter
    [abilities]
        {ABILITY_PHYSICAL_ENDURANCE}
        {ABILITY_SKIRMISHER}
    [/abilities]
    description= _ "The exceedingly rare Shapeshifters, as their name implies, have the ability to take on the shape of other creatures, and even mimic their powers to a limited extent. On their own, they are easily mistaken for elves or humans. Although they rarely use their powers when not called for, they have developed a peculiar custom of hiding behind personalized, often elaborate masks.

Once known for their remarkably peaceful nature, it was this trait that led to their near-extinction in Inferno following Uria’s rise to power. More powerful and bellicose demon lords have slaughtered or enslaved their kind over time, occasionally using them as specialized assassins. Their androgynous appearance, flexible attributes, and unusual resistance to physical damage have allowed them to survive by blending with other lifeforms—rumored to even include Irdyan creatures, civilized or otherwise—at the cost of bloodline purity and their continuance as a species.

Before their downfall, they had rarely been governed by any demon lords of their own, Zhangor being one of the last successful tyrants to take over. It is currently unclear whether the shapeshifters seen fighting in Irdya after the destruction of the Wesmere hive follow a specific demon lord."
    die_sound={SOUND_LIST:HUMAN_DIE}
    {DEFENSE_ANIM "units/demons/shapeshifter.png" "units/demons/shapeshifter.png" {SOUND_LIST:HUMAN_HIT} }
    [attack]
        name=battle claws
        description={TSTR_ATTACK_NAME_BATTLE_CLAWS}
        icon="attacks/claws-drake.png"
        type=blade
        range=melee
        damage=7
        number=3
        [specials]
            {WEAPON_SPECIAL_BACKSTAB}
        [/specials]
    [/attack]
    [attack]
        name=curse
        description= _ "curse"
        icon="attacks/curse.png"
        type=arcane
        range=ranged
        damage=7
        number=2
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]

    [attack_anim]
        [filter_attack]
            name=battle claws
        [/filter_attack]
        offset=0.0~0.2,0.2~0.7,0.7~0.2,0.2~0.0
        start_time=-300
        [frame]
            duration=300
            image="units/demons/shapeshifter.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=100
                image="units/demons/shapeshifter.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=100
                image="units/demons/shapeshifter.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=200
            image="units/demons/shapeshifter.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=curse
        [/filter_attack]
        [missile_frame]
            begin=-200
            end=200
            halo="halo/elven/druid-healing1.png:50,halo/elven/druid-healing2.png:50,halo/elven/druid-healing3.png:50,halo/elven/druid-healing4.png:50,halo/elven/druid-healing5.png:50,halo/elven/druid-healing6.png:50,halo/elven/druid-healing7.png:50,halo/elven/druid-healing8.png:50"
        [/missile_frame]
        [frame]
            begin=-200
            end=0
            image="units/demons/shapeshifter.png"
        [/frame]
        [frame]
            begin=0
            end=200
            image="units/demons/shapeshifter.png"
            sound=magicmissile.wav
        [/frame]
    [/attack_anim]

    #
    # Used to define attributes to merge with the base, for the gendered
    # variations.
    #
#define SS_SHAPESHIFTER_GENDER_VARIATION _GENDER _HIT_SOUND
    image="units/demons/shapeshifter+{_GENDER}.png"
    {DEFENSE_ANIM "units/demons/shapeshifter+{_GENDER}.png" "units/demons/shapeshifter+{_GENDER}.png" ({_HIT_SOUND})}

    [attack_anim]
        [filter_attack]
            name=battle claws
        [/filter_attack]
        [frame]
            image="units/demons/shapeshifter+{_GENDER}.png"
        [/frame]
        [if]
            [frame]
                image="units/demons/shapeshifter+{_GENDER}.png"
            [/frame]
        [/if]
        [else]
            [frame]
                image="units/demons/shapeshifter+{_GENDER}.png"
            [/frame]
        [/else]
        [frame]
            image="units/demons/shapeshifter+{_GENDER}.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=curse
        [/filter_attack]
        [frame]
            image="units/demons/shapeshifter+{_GENDER}.png"
        [/frame]
        [frame]
            image="units/demons/shapeshifter+{_GENDER}.png"
        [/frame]
    [/attack_anim]
#enddef

    #
    # No visual difference between male and female for the base variation,
    # which acts as a whole as a third neutral gender, except for the names
    # and sounds it uses.
    #

    [female]
        name= _ "female^Demoness Shapeshifter"
        gender=female
        die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}
        {DEFENSE_ANIM "units/demons/shapeshifter.png" "units/demons/shapeshifter.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
    [/female]

    #
    # [variation] gender variations work in a somewhat counter-intuitive way
    # (in 1.11.x, at least):
    #
    #   * [variation] [female] inherits images, animations, etc. from the
    #     base directly, not the base [female] definition.
    #   * However, it correctly inherits name= from the base [female].
    #
    # When instantiating units, the game checks for the unit type's gender
    # variation and any variations applicable to it, in that order:
    #
    #     const unit_type & new_type = u_type.get_gender_unit_type(gender_).get_variation(variation_);
    #
    # Therefore, we can trick the game into giving us a female variation's
    # variation by defining the variation in the base [female], as well as
    # directly in the base for the male (default) variation.
    #
    # This doesn't work with the help system (not even when the base
    # variation has two genders), but this doesn't matter for our use case
    # here since we don't want the 'gendered' Shapeshifter variation to be
    # listed there anyway.
    #

    [variation]
        variation_id=gendered
        inherit=yes
        gender=male
        hide_help=yes
        {SS_SHAPESHIFTER_GENDER_VARIATION     male   ({SOUND_LIST:HUMAN_HIT})}
    [/variation]

    [+female]
        [variation]
            variation_id=gendered
            inherit=yes
            gender=female
            hide_help=yes
            {SS_SHAPESHIFTER_GENDER_VARIATION female ({SOUND_LIST:HUMAN_FEMALE_HIT})}
        [/variation]
    [/female]
[/unit_type]

#undef SS_SHAPESHIFTER_GENDER_VARIATION

#endif

# kate: indent-mode normal; encoding utf-8; space-indent on;


#textdomain wesnoth-After_the_Storm

#ifdef CAMPAIGN_AFTER_THE_STORM_EPISODE_III
[unit_type]
    id=Demon Hellbent Tide
    name= _ "female^Demoness Hellbent Tide"
    race=demon
    gender=female
    image="units/demons/hellbent-tide.png"
    hitpoints=83
    movement_type=demonfly
    movement=6
    experience=200
    level=4
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=120
    usage=mixed fighter
    {TRAIT_DEXTROUS}
    [resistance]
        cold=80
        impact=90
    [/resistance]
    [abilities]
        {ABILITY_PROTECTION}
    [/abilities]
    description= _ "Formerly one of Uria’s closest vassals, the Demon Lord of the Storms is perhaps the youngest demoness besides the undisputed ruler of Inferno herself to rise to power. Descendant of the Great Followers of the Wind, her mastery of this element is unrivaled.

Her rule over the stormkind people is unusual in that she cares for the well-being of their already sparse population. This often requires coping with Uria’s sadistic nature and complying with her commands in order to minimize casualties and secure her trust for less evident purposes."
    {DEFENSE_ANIM_RANGE "units/demons/hellbent-tide.png" "units/demons/hellbent-tide.png" {SOUND_LIST:HUMAN_FEMALE_HIT} melee }
    {DEFENSE_ANIM_ELVEN_RANGE "units/demons/hellbent-tide.png" "units/demons/hellbent-tide.png" {SOUND_LIST:HUMAN_FEMALE_HIT} ranged }
    die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}
    [attack]
        name=wind strike
        description= _ "wind strike"
        icon=attacks/fist-human.png
        type=impact
        range=melee
        damage=10
        number=2
    [/attack]
    [attack]
        name=hellbent tide
        description= _ "hellbent tide"
        icon=attacks/hellbent-tide.png
        type=impact
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=6
        number=7
    [/attack]
    [attack_anim]
        [filter_attack]
            name=wind strike
        [/filter_attack]

        start_time=-400
        offset="0.0~-0.1:100,-0.1~0.9:250,0.9~0.0"

        halo="halo/elven/druid-healing[1~8].png:80,misc/blank-hex.png:160"
        halo_mod="~CS(64,0,64)~O(0.5)"

        [frame]
            image="units/demons/hellbent-tide.png:800"
        [/frame]

        [if]
            hits=yes
            impact_start_time=-51
            impact_offset=1.0
            impact_layer=49 # in front of units, behind foreground terrain
            impact_image_mod="~CS(0,-32,0)"

            [impact_frame]
                image="misc/blank-hex.png"
                duration=1
            [/impact_frame]
            [impact_frame]
                image="projectiles/wind-strike-[1~2].png:125"
            [/impact_frame]
            [impact_frame]
                image="projectiles/wind-strike-2.png~BL(1):200"
                alpha="1.0~0.0"
            [/impact_frame]
        [/if]

        {SOUND:HIT_AND_MISS fist.ogg {SOUND_LIST:MISS} -50}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=hellbent tide
        [/filter_attack]

        start_time=-600

        {STORMKIND_ATTACK_HALO}

        halo1_halo_mod="~CS(-64,-128,0)"
        halo2_halo_mod="~CS(0,-32,0)"
        halo3_halo_mod="~CS(-64,-128,0)"
        #halo3_halo_mod="~CS(0,-128,-128)"

        missile_start_time=-400
        missile_halo="halo/elven/druid-healing[1~5].png:70,halo/elven/druid-healing6.png~O(0.75):70,halo/elven/druid-healing7.png~O(0.5):70,halo/elven/druid-healing8.png~O(0.25):70"
        missile_halo_mod="~CS(64,0,64)"
        missile_halo_x=0
        missile_halo_y=-10
        missile_offset="0.0~1.25"
        missile_alpha="1.0:480,1.0~0.0:16"

        [missile_frame]
            image="projectiles/icemissile-n-[1~7].png:80"
            image_diagonal="projectiles/icemissile-ne-[1~7].png:80"
        [/missile_frame]

        [frame]
            image="units/demons/hellbent-tide.png:600"
        [/frame]

        {SOUND:HIT_AND_MISS hellbent-1.ogg magic-faeriefire-miss.ogg -525}
    [/attack_anim]

    [recruit_anim]
        start_time=0
        alpha="0.0~1.0:1400,1.0"
        y="-16~0:1200"
        blend_ratio="0.8~0.0:800,0.0"
        blend_color=255,192,255

        [frame]
            duration=2000
            image="units/demons/hellbent-tide.png"
        [/frame]

        sound_start_time=0

        [sound_frame]
            sound=hellbent-1.ogg
        [/sound_frame]

        impact_start_time=300
        impact_image_mod="~CS(0,-32,0)~SCALE(72,36)"
        impact_y=24
        impact_layer=39 # behind all other frames

        [impact_frame]
            image="projectiles/wind-strike-1.png"
            duration=200
        [/impact_frame]
        [impact_frame]
            image="projectiles/wind-strike-1.png~BL(1)"
            duration=200
        [/impact_frame]
        [impact_frame]
            image="projectiles/wind-strike-2.png"
            duration=200
        [/impact_frame]
        [impact_frame]
            image="projectiles/wind-strike-2.png~BL(1)"
            duration=200
            alpha="1.00~0.60"
        [/impact_frame]
        [impact_frame]
            image="projectiles/wind-strike-2.png~BL(2)"
            duration=200
            alpha="0.60~0.30"
        [/impact_frame]
        [impact_frame]
            image="projectiles/wind-strike-2.png~BL(3)"
            duration=200
            alpha="0.30~0.00"
        [/impact_frame]

        windy_thing_start_time=200
        windy_thing_halo_mod="~CS(64,0,64)"
        windy_thing_y="0~-4:600"

        [windy_thing_frame]
            halo="halo/elven/druid-healing[1~8].png:150"
            halo_x,halo_y=0,6
        [/windy_thing_frame]
    [/recruit_anim]
[/unit_type]
#endif

# kate: indent-mode normal; encoding utf-8; space-indent on;


#textdomain wesnoth-After_the_Storm

#ifdef CAMPAIGN_AFTER_THE_STORM_EPISODE_III
[unit_type]
    id=Demon Slashing Gale
    name= _ "female^Demoness Slashing Gale"
    race=demon
    gender=female
    image="units/demons/slashing-gale+female.png"
    hitpoints=85
    movement_type=demonfly
    movement=7
    experience=200
    level=4
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=110
    usage=fighter
    {TRAIT_DEXTROUS}
    [abilities]
        {ABILITY_TERROR}
        {ABILITY_SKIRMISHER}
    [/abilities]
    [resistance]
        cold=80
        impact=90
    [/resistance]
    description= _ "Armed with deadly metal claws and the remarkable flight skills of their stormkind brethren, the Storm Sisters are hired assassins working for the ranks of the Fist of Uria, bearing the mask of his order. Their experience with glamour magic—though limited as it is—allows them to sport wings much like those often acquired by real faerie creatures. In spite of their vain nature, they are dangerously competent as a group — it would take a great degree of foolishness to underestimate their prowess in combat, and even more to expect them to play fair."
    {DEFENSE_ANIM "units/demons/slashing-gale+female.png" "units/demons/slashing-gale+female.png" {SOUND_LIST:LICH_HIT} }
    die_sound=lich-die.ogg
    [attack]
        name=claws
        description={TSTR_ATTACK_NAME_CLAWS}
        icon=attacks/claws-drake.png
        type=blade
        range=melee
        damage=11
        number=3
        [specials]
            {WEAPON_SPECIAL_BACKSTAB}
            {WEAPON_SPECIAL_DRAIN}
        [/specials]
    [/attack]
    [attack]
        name=wind crush
        description= _ "wind crush"
        icon=attacks/crush-wose.png
        type=impact
        range=melee
        damage=11
        number=2
        [specials]
            {WEAPON_SPECIAL_CHARGE}
        [/specials]
    [/attack]
    [attack]
        name=heart sight
        description= _ "heart sight"
        icon=attacks/heart-sight.png
        type=arcane
        range=ranged
        damage=11
        number=5
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
            {WEAPON_SPECIAL_SLOW}
        [/specials]
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]

        start_time=-400
        offset="0.0~-0.1:100,-0.1~0.9:250,0.9~0.0"

        [frame]
            duration=300
            image="units/demons/slashing-gale+female.png"
        [/frame]

        [if]
            hits=yes
            [frame]
                duration=100
                image="units/demons/slashing-gale+female.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=100
                image="units/demons/slashing-gale+female.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=200
            image="units/demons/slashing-gale+female.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=wind crush
        [/filter_attack]

        start_time=-400
        offset="0.0~-0.1:100,-0.1~0.9:250,0.9~0.0"

        halo="halo/elven/druid-healing[1~8].png:80,misc/blank-hex.png:160"
        halo_mod="~CS(64,0,64)~O(0.5)"

        [frame]
            image="units/demons/slashing-gale+female.png:800"
        [/frame]

        [if]
            hits=yes
            impact_start_time=-51
            impact_offset=1.0
            impact_layer=49 # in front of units, behind foreground terrain
            impact_image_mod="~CS(0,-32,0)"

            [impact_frame]
                image="misc/blank-hex.png"
                duration=1
            [/impact_frame]
            [impact_frame]
                image="projectiles/wind-strike-[1~2].png:125"
            [/impact_frame]
            [impact_frame]
                image="projectiles/wind-strike-2.png~BL(1):200"
                alpha="1.0~0.0"
            [/impact_frame]
        [/if]

        {SOUND:HIT_AND_MISS fist.ogg {SOUND_LIST:MISS} -50}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=heart sight
        [/filter_attack]
        start_time=-300
        missile_start_time=0
        [missile_frame]
            halo="halo/elven/ice-halo[1~6].png:50"
            offset=1.0~0.0
        [/missile_frame]
        [frame]
            duration=100
            image="units/demons/slashing-gale+female.png"
        [/frame]
        [if]
            hits=no
            [frame]
                sound=magic-dark-miss.ogg
                duration=250
                image="units/demons/slashing-gale+female.png"
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                sound=magic-dark.ogg
                duration=250
                image="units/demons/slashing-gale+female.png"
            [/frame]
        [/else]
    [/attack_anim]
[/unit_type]
#endif

# kate: indent-mode normal; encoding utf-8; space-indent on;


#textdomain wesnoth-After_the_Storm

#ifdef CAMPAIGN_AFTER_THE_STORM_EPISODE_III
[unit_type]
    id=Demon Stormtide
    name= _ "Demon Stormtide"
    race=demon
    gender=male,female
    image="units/demons/storm.png"
    hitpoints=46
    movement_type=demonfly
    movement=7
    experience=150
    level=3
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=59
    usage=scout
    {TRAIT_DEXTROUS}
    [abilities]
        {ABILITY_SKIRMISHER}
    [/abilities]
    [resistance]
        cold=80
        arcane=120
    [/resistance]
    description= _ "On occasion, these aerial demons have been mistaken for faeries and undead spirits of demonkind because of their unusual wings and apparent lack of legs. Formerly unheard of, they can summon strong winds and create great storms for laying waste to forests and villages. When combined with their race’s inherent affinity with fire, the effects can be particularly disastrous."
    {DEFENSE_ANIM "units/demons/storm.png" "units/demons/storm.png" {SOUND_LIST:LICH_HIT} }
    die_sound=lich-die.ogg
    [attack]
        name=claws
        description={TSTR_ATTACK_NAME_CLAWS}
        icon=attacks/claws-flaming.png
        type=blade
        range=melee
        damage=7
        number=2
    [/attack]
    [attack]
        name=stormtide
        description= _ "stormtide"
        type=cold
        range=ranged
        damage=7
        number=5
    [/attack]
    [attack]
        name=fire storm
        description= _ "fire storm"
        icon=attacks/fire-storm.png
        type=fire
        range=ranged
        damage=7
        number=5
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=200
                image="units/demons/storm.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=200
                image="units/demons/storm.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=stormtide
        [/filter_attack]

        start_time=-450

        {STORMKIND_ATTACK_HALO}
        {MISSILE_FRAME_FAERIE_FIRE}

        [if]
            hits=yes
            [frame]
                duration=75
                image="units/demons/storm.png"
                sound=magic-faeriefire.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=75
                image="units/demons/storm.png"
                sound=magic-faeriefire-miss.ogg
            [/frame]
        [/else]
        [frame]
            duration=450
            image="units/demons/storm.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=fire storm
        [/filter_attack]

        start_time=-400

        {FLAME_BLAST_ANIMATION}

        [frame]
            duration=600
            image="units/demons/storm.png"
        [/frame]
    [/attack_anim]

    [female]
        name= _ "female^Demoness Stormtide"
        gender=female
        image="units/demons/storm+female.png"
        {DEFENSE_ANIM "units/demons/storm+female.png" "units/demons/storm+female.png" {SOUND_LIST:LICH_HIT} }
        [attack_anim]
            [filter_attack]
                name=claws
            [/filter_attack]
            [if]
                [frame]
                    image="units/demons/storm+female.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    image="units/demons/storm+female.png"
                [/frame]
            [/else]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=stormtide
            [/filter_attack]
            [if]
                [frame]
                    image="units/demons/storm+female.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    image="units/demons/storm+female.png"
                [/frame]
            [/else]
            [frame]
                image="units/demons/storm+female.png"
            [/frame]
            [frame]
                image="units/demons/storm+female.png"
            [/frame]
            [frame]
                image="units/demons/storm+female.png"
            [/frame]
            [frame]
                image="units/demons/storm+female.png"
            [/frame]
            [frame]
                image="units/demons/storm+female.png"
            [/frame]
            [frame]
                image="units/demons/storm+female.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=fire storm
            [/filter_attack]
            [frame]
                image="units/demons/storm+female.png"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]
#endif

# kate: indent-mode normal; encoding utf-8; space-indent on;


#
# Spritesheet image path builder macros
#

#define _SPRITESHEET_FRAME_SINGLE _SPRITESHEET_FILENAME _NAMESTEM _SPRITE_NUM _FRAME_NUM
{_SPRITESHEET_FILENAME}+"~CROP("+{_{_NAMESTEM}_SPRITE_{_SPRITE_NUM}_FRAME_{_FRAME_NUM}:SRC}+")"#enddef

#define _SPRITESHEET_COMPOSITE_INTERNAL _SPRITESHEET_FILENAME _NAMESTEM _SPRITE_NUM _FRAME_NUM _COMPOSITE_NUM
{_SPRITESHEET_FILENAME}+"~CROP("+{_{_NAMESTEM}_SPRITE_{_SPRITE_NUM}_FRAME_{_FRAME_NUM}_O{_COMPOSITE_NUM}:SRC}+")"#enddef

#define _SPRITESHEET_FRAME_COMPOSITE _SPRITESHEET_FILENAME _NAMESTEM _SPRITE_NUM _FRAME_NUM _COMPOSITE_NUM
{_SPRITESHEET_FRAME_SINGLE {_SPRITESHEET_FILENAME} {_NAMESTEM} {_SPRITE_NUM} {_FRAME_NUM}}+"~BLIT("+{_SPRITESHEET_COMPOSITE_INTERNAL ({_SPRITESHEET_FILENAME}) ({_NAMESTEM}) ({_SPRITE_NUM}) ({_FRAME_NUM}) ({_COMPOSITE_NUM})}+","+{_{_NAMESTEM}_SPRITE_{_SPRITE_NUM}_FRAME_{_FRAME_NUM}_O{_COMPOSITE_NUM}:DST}+")"#enddef

#
# Spritesheet macros proper
#

# Blood Core satellites

#define SPRITE:BLOOD_CORE _SPRITE_NUM _FRAME_NUM
{_SPRITESHEET_FRAME_SINGLE "units/demons/gatekeeper-blood.png" BLOOD_CORE {_SPRITE_NUM} {_FRAME_NUM}}#enddef

#define _BLOOD_CORE_SPRITE_1_FRAME_1:SRC
24,96,72,72#enddef

#define _BLOOD_CORE_SPRITE_2_FRAME_1:SRC
96,96,72,72#enddef

#define _BLOOD_CORE_SPRITE_3_FRAME_1:SRC
168,96,72,72#enddef

# Phases 1 through 3 (Angel of Blood/Gatekeeper of Blood A/Gatekeeper of Blood B)

#define SPRITE:BLOOD_GATEKEEPER_SINGLE _SPRITE_NUM _FRAME_NUM
{_SPRITESHEET_FRAME_SINGLE "units/demons/gatekeeper-blood.png" BLOOD_GATEKEEPER {_SPRITE_NUM} {_FRAME_NUM}}#enddef

#define _BLOOD_GATEKEEPER_SPRITE_1_FRAME_1:SRC
24,24,72,72#enddef

#define _BLOOD_GATEKEEPER_SPRITE_2_FRAME_1:SRC
240,24,144,144#enddef

#define _BLOOD_GATEKEEPER_SPRITE_3_FRAME_1:SRC
384,24,144,144#enddef

# Phases 4 through 5 (Crimson Tide A/Crimson Tide B)

#define SPRITE:BLOOD_GATEKEEPER_COMPOSITE _SPRITE_NUM _FRAME_NUM _COMPOSITE_NUM
{_SPRITESHEET_FRAME_COMPOSITE "units/demons/gatekeeper-blood.png" BLOOD_GATEKEEPER {_SPRITE_NUM} {_FRAME_NUM} {_COMPOSITE_NUM}}#enddef

#define _BLOOD_GATEKEEPER_SPRITE_4_FRAME_1:SRC
24,168,144,144#enddef
#define _BLOOD_GATEKEEPER_SPRITE_4_FRAME_1_O1:SRC
168,168,19,48#enddef
#define _BLOOD_GATEKEEPER_SPRITE_4_FRAME_1_O1:DST
84,29#enddef
#define _BLOOD_GATEKEEPER_SPRITE_4_FRAME_1_O2:SRC
195,168,19,48#enddef
#define _BLOOD_GATEKEEPER_SPRITE_4_FRAME_1_O2:DST
84,29#enddef

#define _BLOOD_GATEKEEPER_SPRITE_5_FRAME_1:SRC
240,168,144,172#enddef
#define _BLOOD_GATEKEEPER_SPRITE_5_FRAME_1_O1:SRC
384,168,25,32#enddef
#define _BLOOD_GATEKEEPER_SPRITE_5_FRAME_1_O1:DST
78,40#enddef
#define _BLOOD_GATEKEEPER_SPRITE_5_FRAME_1_O2:SRC
417,168,27,36#enddef
#define _BLOOD_GATEKEEPER_SPRITE_5_FRAME_1_O2:DST
77,38#enddef
#define _BLOOD_GATEKEEPER_SPRITE_5_FRAME_1_O3:SRC
384,212,24,36#enddef
#define _BLOOD_GATEKEEPER_SPRITE_5_FRAME_1_O3:DST
78,40#enddef


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Blood Core
    name= _ "Angel of Blood"
    race=demon
    image={SPRITE:BLOOD_CORE 1 1}
    hitpoints=99
    movement_type=bloodgatekeeperfoot
    movement=6
    {NO_EXPERIENCE_UNIT}
    level=6
    alignment=neutral
    cost=20
    usage=mixed fighter
    hide_help=true
    {TRAIT_UNDEAD}
    # Blood Core arcane resistance fixed at -20% regardless of the main body's
    # resistance.
    [resistance]
        arcane=120
        fire=100
    [/resistance]
    # wmllint: notecheck off
    description={_BLOOD_GATEKEEPER_DESCRIPTION}
    die_sound=hiss-big.wav
    {DEFENSE_ANIM {SPRITE:BLOOD_CORE 1 1} {SPRITE:BLOOD_CORE 1 1} squishy-hit.wav }
    [abilities]
        {ABILITY_ASPECT_DESTROYER}
        {ABILITY_LEADERSHIP}
    [/abilities]

    [attack]
        name=eye of delethia
        description= _ "eye of delethia"
        type=arcane
        range=melee
        damage=14
        number=2
        icon=attacks/nightmare-eye.png
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
            {WEAPON_SPECIAL_SLOW}
        [/specials]
        attack_weight=0.0
    [/attack]
    [attack]
        name=eye of delethia
        description= _ "eye of delethia"
        type=arcane
        range=ranged
        damage=14
        number=2
        icon=attacks/nightmare-eye.png
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
            {WEAPON_SPECIAL_SLOW}
        [/specials]
    [/attack]

    [attack_anim]
        [filter_attack]
            range=ranged
        [/filter_attack]

        missile_start_time=-100
        start_time=-200

        [missile_frame]
            duration=100
            image="projectiles/lightning-n.png"
            image_diagonal="projectiles/lightning-ne.png"
        [/missile_frame]

        [if]
            hits=yes
            [frame]
                image={SPRITE:BLOOD_CORE 1 1}+":150" # -200..-50
                sound=magic-dark.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                image={SPRITE:BLOOD_CORE 1 1}+":150" # -200..-50
                sound=magic-dark-miss.ogg
            [/frame]
        [/else]
        [frame]
            image={SPRITE:BLOOD_CORE 1 1}+":150" # -50..100
        [/frame]
    [/attack_anim]

    [attack_anim]
        [filter_attack]
            range=melee
        [/filter_attack]

        start_time=-300

        [frame]
            image={SPRITE:BLOOD_CORE 1 1}+":100" # -300..-200
        [/frame]

        [frame]
            image={SPRITE:BLOOD_CORE 1 1}+":150" # -200..-50
            sound=squishy-miss.wav
        [/frame]

        [if]
            hits=yes
            [frame]
                image={SPRITE:BLOOD_CORE 1 1}+":250" # -50..200
                sound=magic-dark.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                image={SPRITE:BLOOD_CORE 1 1}+":250" # -50..200
                sound=magic-dark-miss.ogg
            [/frame]
        [/else]
    [/attack_anim]

    #
    # Mobile variations
    #

    [variation]
        variation_id=alpha
        inherit=yes
        movement_type=bloodnightmarefoot
    [/variation]

    [variation]
        variation_id=beta
        inherit=yes
        movement_type=bloodnightmarefoot
        image={SPRITE:BLOOD_CORE 2 1}
        {DEFENSE_ANIM {SPRITE:BLOOD_CORE 2 1} {SPRITE:BLOOD_CORE 2 1} squishy-hit.wav }
        [attack_anim]
            [filter_attack]
                range=ranged
            [/filter_attack]
            [if]
                [frame]
                    image={SPRITE:BLOOD_CORE 2 1}+":150"
                [/frame]
            [/if]
            [else]
                [frame]
                    image={SPRITE:BLOOD_CORE 2 1}+":150"
                [/frame]
            [/else]
            [frame]
                image={SPRITE:BLOOD_CORE 2 1}+":150"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                range=melee
            [/filter_attack]
            [frame]
                image={SPRITE:BLOOD_CORE 2 1}+":100"
            [/frame]
            [frame]
                image={SPRITE:BLOOD_CORE 2 1}+":150"
            [/frame]
            [if]
                [frame]
                    image={SPRITE:BLOOD_CORE 2 1}+":250"
                [/frame]
            [/if]
            [else]
                [frame]
                    image={SPRITE:BLOOD_CORE 2 1}+":250"
                [/frame]
            [/else]
        [/attack_anim]
    [/variation]

    [variation]
        variation_id=gamma
        inherit=yes
        movement_type=bloodnightmarefoot
        image={SPRITE:BLOOD_CORE 3 1}
        {DEFENSE_ANIM {SPRITE:BLOOD_CORE 3 1} {SPRITE:BLOOD_CORE 3 1} squishy-hit.wav }
        [attack_anim]
            [filter_attack]
                range=ranged
            [/filter_attack]
            [if]
                [frame]
                    image={SPRITE:BLOOD_CORE 3 1}+":150"
                [/frame]
            [/if]
            [else]
                [frame]
                    image={SPRITE:BLOOD_CORE 3 1}+":150"
                [/frame]
            [/else]
            [frame]
                image={SPRITE:BLOOD_CORE 3 1}+":150"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                range=melee
            [/filter_attack]
            [frame]
                image={SPRITE:BLOOD_CORE 3 1}+":100"
            [/frame]
            [frame]
                image={SPRITE:BLOOD_CORE 3 1}+":150"
            [/frame]
            [if]
                [frame]
                    image={SPRITE:BLOOD_CORE 3 1}+":250"
                [/frame]
            [/if]
            [else]
                [frame]
                    image={SPRITE:BLOOD_CORE 3 1}+":250"
                [/frame]
            [/else]
        [/attack_anim]
    [/variation]
[/unit_type]


#textdomain wesnoth-After_the_Storm

#
# Phase 1 (Angel of Blood)
#

#undef _GATEKEEPER_FRAME
#define _GATEKEEPER_FRAME _FRAME_NUM
{SPRITE:BLOOD_GATEKEEPER_SINGLE 1 {_FRAME_NUM}}#enddef

[unit_type]
    id=Angel of Blood
    name= _ "Angel of Blood"
    race=shaxthal
    image={_GATEKEEPER_FRAME 1}
    #profile="portraits/zhangor.png"
    hitpoints=181
    movement_type=biomechanical_elusivefoot
    movement=5
    {NO_EXPERIENCE_UNIT}
    level=6
    alignment=neutral
    cost=703
    usage=mixed fighter
    hide_help=true
    undead_variation=null
    {BLOOD_ANGEL_RESISTANCES}
    [abilities]
        {ABILITY_ASPECT_DESTROYER}
        {ABILITY_TERROR}
    [/abilities]
    # wmllint: notecheck off
    description={_BLOOD_GATEKEEPER_DESCRIPTION}
    die_sound={SOUND_LIST:ORC_DIE}

    {DEFENSE_ANIM {_GATEKEEPER_FRAME 1} {_GATEKEEPER_FRAME 1} {SOUND_LIST:ORC_HIT} }

    [attack]
        name=soul spear
        description= _ "soul spear"
        type=arcane
        range=melee
        damage=22
        number=2
        icon=attacks/soul-spear.png
        [specials]
            {WEAPON_SPECIAL_MARKSMAN}
            {WEAPON_SPECIAL_STUN}
        [/specials]
    [/attack]
    [attack]
        name=blood storm
        description= _ "blood storm"
        icon=attacks/blood-storm-1.png
        type=arcane
        range=ranged
        damage=11
        number=6
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]

    # Single animation for soul spear

    {SOUL_SPEAR_ANIMATION}

    # Multiple random variations for the blood storm attack animation

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

{_CONTINUE_UNIT_TYPE}


#textdomain wesnoth-After_the_Storm

#
# Phases 2 and 3 (Gatekeeper of Blood A/Gatekeeper of Blood B)
#

#define _BLOOD_GATEKEEPER_BASE_STATS
    name= _ "Gatekeeper of Blood"
    race=shaxthal
    #bar_offset_x,bar_offset_y=-8,-24
    profile="misc/blank-hex.png" # The baseframe isn't very adequate for [message]
    {NO_EXPERIENCE_UNIT}
    alignment=neutral
    usage=mixed fighter
    cost=730
    hide_help=true
    undead_variation=null
    [abilities]
        {ABILITY_ASPECT_DESTROYER}
        {ABILITY_TERROR}
    [/abilities]
    # wmllint: notecheck off
    description={_BLOOD_GATEKEEPER_DESCRIPTION}
    die_sound=drake-die.ogg
#enddef

#define _BLOOD_GATEKEEPER_ATTACK:CLAWS _DAMAGE _COUNT _SPECIALS
    [attack]
        name=claws
        description={I18N:ATTACK_CLAWS}
        type=blade
        range=melee
        damage={_DAMAGE}
        number={_COUNT}
        icon=attacks/blood-claws.png
        [specials]
            {_SPECIALS}
        [/specials]
    [/attack]

    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]

        start_time=-250
        offset="0.0~0.15:250,0.15~0.0:250"

        [frame]
            duration=500
        [/frame]

        {SOUND:HIT_AND_MISS claws.ogg {SOUND_LIST:MISS} -100}
    [/attack_anim]
#enddef

#define _BLOOD_GATEKEEPER_ATTACK:BLOOD_STORM _DAMAGE _COUNT
    [attack]
        name=blood storm
        description= _ "blood storm"
        icon=attacks/blood-storm-1.png
        type=arcane
        range=ranged
        damage={_DAMAGE}
        number={_COUNT}
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]

    # Multiple random variations for the blood storm attack animation

    {BLOOD_STORM_ANIMATION 1 2}
    {BLOOD_STORM_ANIMATION 2 1}
    {BLOOD_STORM_ANIMATION 2 3}
    {BLOOD_STORM_ANIMATION 3 2}
    {BLOOD_STORM_ANIMATION 1 3}
    {BLOOD_STORM_ANIMATION 3 1}
#enddef

#
# Phase 2 (Gatekeepr of Blood A)
#

#undef _GATEKEEPER_FRAME
#define _GATEKEEPER_FRAME _FRAME_NUM
{SPRITE:BLOOD_GATEKEEPER_SINGLE 2 {_FRAME_NUM}}#enddef

[variation]
    variation_id=gatekeeper_phase2
    inherit=no

    {_BLOOD_GATEKEEPER_BASE_STATS}

    level=6
    hitpoints=442
    movement_type=bloodgatekeeperfoot
    movement=1

    image={SPRITE:BLOOD_GATEKEEPER_SINGLE 2 1}
    {DEFENSE_ANIM {SPRITE:BLOOD_GATEKEEPER_SINGLE 2 1} {SPRITE:BLOOD_GATEKEEPER_SINGLE 2 1} {SOUND_LIST:DRAKE_HIT} }

    {_BLOOD_GATEKEEPER_ATTACK:CLAWS 26 2 ({WEAPON_SPECIAL_POISON})}

    {_BLOOD_GATEKEEPER_ATTACK:BLOOD_STORM 18 6}
[/variation]

#
# Phase 3 (Gatekeepr of Blood b)
#

#undef _GATEKEEPER_FRAME
#define _GATEKEEPER_FRAME _FRAME_NUM
{SPRITE:BLOOD_GATEKEEPER_SINGLE 3 {_FRAME_NUM}}#enddef

[variation]
    variation_id=gatekeeper_phase3
    inherit=no

    {_BLOOD_GATEKEEPER_BASE_STATS}

    level=6
    hitpoints=460
    movement_type=bloodgatekeeperfoot
    movement=1

    image={SPRITE:BLOOD_GATEKEEPER_SINGLE 3 1}
    {DEFENSE_ANIM {SPRITE:BLOOD_GATEKEEPER_SINGLE 3 1} {SPRITE:BLOOD_GATEKEEPER_SINGLE 3 1} {SOUND_LIST:DRAKE_HIT} }

    {_BLOOD_GATEKEEPER_ATTACK:CLAWS 32 2 ({WEAPON_SPECIAL_STUN})}

    {_BLOOD_GATEKEEPER_ATTACK:BLOOD_STORM 22 6}
[/variation]


#textdomain wesnoth-After_the_Storm

#
# Phases 4 and 5 (Crimson Tide A/Crimson Tide B)
#
# Subvariations in both phases MUST have the exact same health pool in order to
# avoid issues with variation cycling in v1.14!
#
# His level goes down to 6 during phase 5 in order to allow Elynia and Elyssa
# to deal the normal amount of damage again.
#

#define _BLOOD_NIGHTMARE_BASE_STATS
    name= _ "Crimson Nightmare"
    race=demon
    #bar_offset_x,bar_offset_y=-8,-24
    profile="misc/blank-hex.png" # The baseframe isn't very adequate for [message]
    {NO_EXPERIENCE_UNIT}
    alignment=neutral
    usage=mixed fighter
    cost=802
    hide_help=true
    undead_variation=null
    {TRAIT_UNDEAD}
    # wmllint: notecheck off
    description="sectionEi.cold._ZN4help17generate_sectionsEPK6configRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_7sectionEi.cold._GLOBAL__sub_I__ZN4help8game_cfgE.help_menu.cpp._ZN4help9help_menu11indent_listERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj.cold._ZN4help9help_menu18get_string_to_showB5cxx11ERKNS_5topicEj.cold._ZN4help9help_menu18get_string_to_showB5cxx11ERKNS_7sectionEj.cold._ZN4help9help_menu20update_visible_itemsERKNS_7sectionEj.cold._ZN4help9help_menu21display_visible_itemsEv.cold._ZN4help9help_menuC2ER6CVideoRKNS_7sectionEi.cold._ZN4help9help_menu7processEv.cold._GLOBAL__sub_I__ZN4help9help_menuC2ER6CVideoRKNS_7sectionEi.help_text_area.cpp._ZN4help14help_text_area13draw_contentsEv.cold._ZN4help14help_text_area4itemC2E7surfaceiiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_bbNS0_9ALIGNMENTE.cold._ZN4help14help_text_area8add_itemERKNS0_4itemE.cold._ZN4help14help_text_area15handle_jump_cfgERK6config.cold._ZN4help14help_text_area13add_text_itemERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_bibb7color_t.cold._ZN4help14help_text_area15handle_bold_cfgERK6config.cold." # wmllint: ignore
    [abilities]
        [dummy]
            id=aspect_of_existence
            name= _ "aspect of existence"
            # po: This description is intentionally corrupted.
            # po: It ought to follow a similar template as the ones used for
            # po: the Aspect of Earth and Aspect of Darkness abilities, but
            # po: with glitched or missing characters and sequences. It is also
            # po: intentionally misleading.
            description= _ "This →nit is a Guardian of the Aspect of Exist nce.

As s↑ch it h
s acces  s t‘ g   ¢ G& following ¢®     ~Objective©>span color='
Vanquish Demon Lord Zhangor
¥Ŋ
 Ë   Ł
  ª
 • Regeneration (+999 HP per turn)␊
 • Immortality (can only be kill±ªific units)°™¡End
 Scenario␀"
        [/dummy]

        [regenerate]
            value=32
            id=aspect_zhangor_regenerates
            affect_self=yes
            poison=cured
        [/regenerate]

#        [heals]
#            value=16
#            id=aspect_of_existence_healing_curing
#            affect_allies=yes
#            affect_self=no
#            poison=cured
#            [affect_adjacent]
#                adjacent=n,ne,se,s,sw,nw
#            [/affect_adjacent]
#        [/heals]

        {ABILITY_ASPECT_DESTROYER}
        {ABILITY_TERROR}
    [/abilities]
#enddef

#define _BLOOD_NIGHTMARE_ATTACK:GRASP
    [attack]
        name=nightmare grasp
        description= _ "nightmare grasp"
        type=impact
        range=melee
        damage=8
        number=15
        icon=attacks/blood-grasp.png
        [specials]
            {WEAPON_SPECIAL_SWARM}
        [/specials]
    [/attack]

    [attack_anim]
        [filter_attack]
            name=nightmare grasp
        [/filter_attack]

        start_time=-400
        offset="0.0~-0.2:100,-0.2~0.2:300,0.2~0.0:400"

        [frame]
            duration=800
        [/frame]

        {SOUND:HIT_AND_MISS mud-fist.ogg mud-fist-miss.ogg -250}
    [/attack_anim]
#enddef

#define _BLOOD_NIGHTMARE_ATTACK:CLAWS
    [attack]
        name=claws
        description={I18N:ATTACK_CLAWS}
        # This is intentionally impact instead of blade. His attacks are
        # supposed to be becoming increasingly powerful but also erratic, so
        # he can't aim precisely at the heroines.
        type=impact
        range=melee
        damage=42
        number=4
        icon=attacks/blood-claws.png
        [specials]
            {WEAPON_SPECIAL_SWARM}
        [/specials]
    [/attack]

    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]

        start_time=-350
        offset="0.0~0.2:250,0.2~0.0:350"

        [frame]
            duration=600
        [/frame]

        {SOUND:HIT_AND_MISS claws.ogg {SOUND_LIST:MISS} -100}
    [/attack_anim]
#enddef

#define _BLOOD_NIGHTMARE_ATTACK:GAZE_ABYSS
    # Big Beam of Instant Death for anything that isn't Elynia or Elyssa
    [attack]
        name=gaze of the abyss
        description= _ "gaze of the abyss"
        type=arcane
        range=ranged
        damage=255 # YES
        number=1
        icon=attacks/blood-beam.png
        attack_weight=3.0
        [specials]
            {WEAPON_SPECIAL_ALWAYS_HITS} # YES
        [/specials]
    [/attack]

    [attack_anim]
        [filter_attack]
            name=gaze of the abyss
        [/filter_attack]

        {BLOOD_LASER_BEAM}

        prelude_sound_start_time=-750
        [prelude_sound_frame]
            sound=gun-energy-huge-fire-prelude.ogg
        [/prelude_sound_frame]

        fire_sound_start_time=-100
        [fire_sound_frame]
            sound=gun-energy-huge-fire.ogg
        [/fire_sound_frame]
    [/attack_anim]
#enddef

#define _BLOOD_NIGHTMARE_ATTACK:BLOOD_RAIN
    [attack]
        name=blood rain
        description= _ "blood rain"
        type=arcane
        range=ranged
        damage=32
        number=4
        icon=attacks/blood-rain.png
        attack_weight=3.0
        [specials]
            {WEAPON_SPECIAL_SLOW}
            {WEAPON_SPECIAL_POISON}
            {WEAPON_SPECIAL_MARKSMAN}
        [/specials]
    [/attack]

    [attack_anim]
        [filter_attack]
            name=blood rain
        [/filter_attack]

        missile_start_time=-300
        [missile_frame]
            duration=600
            image="projectiles/blood-rain-n.png"
            image_diagonal="projectiles/blood-rain-ne.png"
            halo=halo/elven/nature-halo[1~8].png:75
            halo_x,halo_y=5,-10
            halo_mod="~BLEND(255,48,48,0.5)~CS(50,-50,-50)"
        [/missile_frame]

        {SOUND:HIT_AND_MISS magic-dark-big.ogg magic-dark-big-miss.ogg -300}
    [/attack_anim]
#enddef

#define _BLOOD_NIGHTMARE_ATTACK:BLOAT_METEOR
    [attack]
        name=bloat meteor
        description= _ "bloat meteor"
        type=impact
        range=ranged
        damage=24
        number=3
        icon=attacks/blood-bloat.png
        attack_weight=3.0
        [specials]
            {WEAPON_SPECIAL_STUN}
            {WEAPON_SPECIAL_ALWAYS_HITS}
        [/specials]
    [/attack]

    [attack_anim]
        [filter_attack]
            name=bloat meteor
        [/filter_attack]

        missile_start_time=-500
        [missile_frame]
            duration=500
            image="projectiles/bloat-meteor-n.png"
            image_diagonal="projectiles/bloat-meteor-ne.png"
            sound=magic-dark-miss.ogg
        [/missile_frame]

        sound_start_time=-350
        [sound_frame]
            sound=melee-fire.ogg
        [/sound_frame]
    [/attack_anim]
#enddef

#define _BLOOD_NIGHTMARE_ATTACK:CORE_BURST
    [attack]
        name=core burst
        description= _ "core burst"
        type=arcane
        range=ranged
        damage=4
        number=16
        icon=attacks/blood-burst.png
        attack_weight=3.0
        [specials]
            {WEAPON_SPECIAL_SWARM}
            {WEAPON_SPECIAL_ALWAYS_HITS}
        [/specials]
    [/attack]

    [attack_anim]
        [filter_attack]
            name=core burst
        [/filter_attack]

        {MISSILE_FRAME_FAERIE_FIRE}
        missile_blend_color=255,48,48
        missile_blend_ratio=0.5
        missile_halo_mod="~BLEND(255,48,48,0.5)"

        sound1_start_time=-300
        [sound1_frame]
            sound=magic-dark.ogg,magic-dark-big.ogg
        [/sound1_frame]

        sound2_start_time=-300
        [sound2_frame]
            sound=magic-missile-[1~3].ogg
        [/sound2_frame]
    [/attack_anim]
#enddef

#
# Phase 4A
#

#undef _GATEKEEPER_FRAME
#define _GATEKEEPER_FRAME _FRAME_NUM
{SPRITE:BLOOD_GATEKEEPER_SINGLE 4 {_FRAME_NUM}}#enddef

[variation]
    variation_id=nightmare_phase4a
    inherit=no

    {_BLOOD_NIGHTMARE_BASE_STATS}

    level=7
    hitpoints=513
    movement_type=bloodnightmarefoot
    movement=4

    image={_GATEKEEPER_FRAME 1}
    {DEFENSE_ANIM {_GATEKEEPER_FRAME 1} {_GATEKEEPER_FRAME 1} {SOUND_LIST:LICH_HIT} }

    {_BLOOD_NIGHTMARE_ATTACK:GRASP}

    {_BLOOD_NIGHTMARE_ATTACK:BLOOD_RAIN}
[/variation]

#
# Phase 4B
#

#undef _GATEKEEPER_FRAME
#define _GATEKEEPER_FRAME _FRAME_NUM
{SPRITE:BLOOD_GATEKEEPER_COMPOSITE 4 {_FRAME_NUM} 1}#enddef

[variation]
    variation_id=nightmare_phase4b
    inherit=no

    {_BLOOD_NIGHTMARE_BASE_STATS}

    level=7
    hitpoints=513
    movement_type=bloodnightmarefoot
    movement=4

    image={_GATEKEEPER_FRAME 1}
    {DEFENSE_ANIM {_GATEKEEPER_FRAME 1} {_GATEKEEPER_FRAME 1} {SOUND_LIST:LICH_HIT} }

    {_BLOOD_NIGHTMARE_ATTACK:GRASP}

    {_BLOOD_NIGHTMARE_ATTACK:BLOAT_METEOR}
[/variation]

#
# Phase 4C
#

#undef _GATEKEEPER_FRAME
#define _GATEKEEPER_FRAME _FRAME_NUM
{SPRITE:BLOOD_GATEKEEPER_COMPOSITE 4 {_FRAME_NUM} 2}#enddef

[variation]
    variation_id=nightmare_phase4c
    inherit=no

    {_BLOOD_NIGHTMARE_BASE_STATS}

    level=7
    hitpoints=513
    movement_type=bloodnightmarefoot
    movement=4

    image={_GATEKEEPER_FRAME 1}
    {DEFENSE_ANIM {_GATEKEEPER_FRAME 1} {_GATEKEEPER_FRAME 1} {SOUND_LIST:LICH_HIT} }

    {_BLOOD_NIGHTMARE_ATTACK:GRASP}

    {_BLOOD_NIGHTMARE_ATTACK:GAZE_ABYSS}
[/variation]

#
# Phase 5A
#

#undef _GATEKEEPER_FRAME
#define _GATEKEEPER_FRAME _FRAME_NUM
{SPRITE:BLOOD_GATEKEEPER_COMPOSITE 5 {_FRAME_NUM} 1}#enddef

[variation]
    variation_id=nightmare_phase5a
    inherit=no

    {_BLOOD_NIGHTMARE_BASE_STATS}

    name= _ "Hellbound Scourge"

    level=6
    hitpoints=550
    movement_type=bloodnightmarefoot
    movement=4

    image={_GATEKEEPER_FRAME 1}
    {DEFENSE_ANIM {_GATEKEEPER_FRAME 1} {_GATEKEEPER_FRAME 1} {SOUND_LIST:LICH_HIT} }

    {_BLOOD_NIGHTMARE_ATTACK:CLAWS}

    {_BLOOD_NIGHTMARE_ATTACK:BLOOD_RAIN}
[/variation]

#
# Phase 5B
#

#undef _GATEKEEPER_FRAME
#define _GATEKEEPER_FRAME _FRAME_NUM
{SPRITE:BLOOD_GATEKEEPER_COMPOSITE 5 {_FRAME_NUM} 2}#enddef

[variation]
    variation_id=nightmare_phase5b
    inherit=no

    {_BLOOD_NIGHTMARE_BASE_STATS}

    name= _ "Elvish Prophet"

    level=6
    hitpoints=550
    movement_type=bloodnightmarefoot
    movement=4

    image={_GATEKEEPER_FRAME 1}
    {DEFENSE_ANIM {_GATEKEEPER_FRAME 1} {_GATEKEEPER_FRAME 1} {SOUND_LIST:LICH_HIT} }

    {_BLOOD_NIGHTMARE_ATTACK:GRASP}

    {_BLOOD_NIGHTMARE_ATTACK:CORE_BURST}
[/variation]

#
# Phase 5C
#

#undef _GATEKEEPER_FRAME
#define _GATEKEEPER_FRAME _FRAME_NUM
{SPRITE:BLOOD_GATEKEEPER_COMPOSITE 5 {_FRAME_NUM} 3}#enddef

[variation]
    variation_id=nightmare_phase5c
    inherit=no

    {_BLOOD_NIGHTMARE_BASE_STATS}

    name= _ "Crimson Tide"

    level=6
    hitpoints=550
    movement_type=bloodnightmarefoot
    movement=4

    image={_GATEKEEPER_FRAME 1}
    {DEFENSE_ANIM {_GATEKEEPER_FRAME 1} {_GATEKEEPER_FRAME 1} {SOUND_LIST:LICH_HIT} }

    {_BLOOD_NIGHTMARE_ATTACK:CLAWS}

    {_BLOOD_NIGHTMARE_ATTACK:GAZE_ABYSS}
[/variation]


#textdomain wesnoth-After_the_Storm

#ifndef CAMPAIGN_AFTER_THE_STORM_EPISODE_III
#error Unit loaded in the wrong episode? What are you doing love?
#endif

#define _BLOOD_GATEKEEPER_DESCRIPTION
    _ "While the history of how the War of Wesmere came to happen is only known to a few elves in the present day, there are even fewer people who know about Zhangor’s true origins. The few records left of his rule in Urvatha speak of his achievements as an implacable warlord who led his people into a slaughter of unprecedented proportions, sealing the fate of shapeshifters for the rest of eternity. Some sources claim that it was this — his most shameful defeat — that led him to take the power of the mythical sentinel between worlds and seek to amplify it using the souls of Irdya’s people as sacrifice."
#enddef

#
# General utility
#

# Avoid WML tools freaking out due to unbalanced tags

#define _CONTINUE_UNIT_TYPE
    [+unit_type]
#enddef

#define _END_UNIT_TYPE
[/unit_type]
#enddef

#
# Zhangor's aspect is Existence by virtue of him having assimilated a
# Gatekeeper's core into his body. Elynia's and Elyssa's base arcane
# resistance is fixed at 0%. As a (rather poor) user of one of the bielemental
# aspects, Zhangor's arcane resistance is meant to be abnormally high. This
# requires combat to involve more than just throwing numbers at him and hoping
# for the best.
#

#
# Phase 1 movetype
#
# biomechanical_elusivefoot is used for every aspect other than damage
# resistances. He's only slightly larger than Elynia and very mobile.
#

#define BLOOD_ANGEL_RESISTANCES
    [resistance]
        blade=80
        impact=70
        arcane=80
        fire=80
        cold=80
    [/resistance]
#enddef

#
# Phase 2 and 3 movetype (also used for Blood Core Alpha)
#
# In Gatekeeper form, Zhangor is unable to move as his lower body is affixed
# to the ground and attempting to fuse with the seed's hyphae. He's HUGE so he
# doesn't get any terrain defense bonuses from now on, compensating for this
# disadvantage by acting like a massive damage sponge.
#

[movetype]
    name=bloodgatekeeperfoot
    flies=no
    [movement_costs][/movement_costs]
    [defense]
        {FLY_DEFENSE 50}
        cave=50
        fungus=50
    [/defense]
    [resistance]
        blade=70
        pierce=70
        impact=60
        arcane=90
        fire=70
        cold=70
    [/resistance]
[/movetype]

#
# Phases 4 and 5 (also used for Blood Cores Beta and Gamma)
#
# In Nightmare form, Zhangor is able to move again. Defense remains unchanged
# (he's still huge). His arcane resistance is its lowest at this point.
#

[movetype]
    name=bloodnightmarefoot
    flies=yes
    [movement_costs]
        {FLY_MOVE}
        cave=1
        fungus=1
    [/movement_costs]
    [defense]
        {FLY_DEFENSE 50}
        cave=50
        fungus=50
    [/defense]
    [resistance]
        blade=50
        pierce=50
        impact=40
        arcane=100
        fire=60
        cold=60
    [/resistance]
[/movetype]


#textdomain wesnoth-utbs

[unit_type]
    id=Quenoth Archer
    name= _ "Quenoth Archer"
    image=units/elves-quenoth/archer.png
    profile="portraits/quenoth/archer.png"
    race=elf
    hitpoints=40
    movement_type=quenoth_horse
    [resistance]
        pierce=120
    [/resistance]
    movement=8
    experience=90
    level=2
    alignment=lawful
    advances_to=Quenoth Marksman
    cost=18
    usage=scout
    description= _ "With the open sands providing much less protection than the old forests did, the wide ranks of elvish archers that once formed the core of the elvish military have all but disappeared. Instead, the few who still dedicate themselves to the traditional weapon of their ancestors practice the art from the saddle, allowing them to more easily avoid the perils of melee combat."
    die_sound=horse-die.ogg
    [abilities]
        {ABILITY_DISENGAGE}
    [/abilities]
    [attack]
        name=sword
        #textdomain wesnoth-units
        description= _"sword"
        type=blade
        range=melee
        damage=7
        number=3
        icon=attacks/sword-elven.png
        movement_used=0
    [/attack]
    [attack]
        name=bow
        description= _"bow"
        #textdomain wesnoth-utbs
        type=pierce
        range=ranged
        damage=7
        number=4
        icon=attacks/bow-elven.png
        movement_used=0
    [/attack]
    {DEFENSE_ANIM "units/elves-quenoth/archer-defend2.png" "units/elves-quenoth/archer-defend1.png" {SOUND_LIST:HORSE_HIT}}
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        offset=0.0~0.3,0.3~0.5,0.5~0.60,0.60~0.3,0.3~0.0
        start_time=-300
        [frame]
            duration=450
            image="units/elves-quenoth/archer.png"
        [/frame]
        {SOUND:HIT_AND_MISS {SOUND_LIST:SWORD_SWISH} {SOUND_LIST:MISS} -100}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=bow
        [/filter_attack]
        missile_start_time=-100
        [missile_frame]
            duration=100
            image=projectiles/missile-n.png
            image_diagonal=projectiles/missile-ne.png
        [/missile_frame]
        start_time=-380
        [frame]
            image=units/elves-quenoth/archer.png:470
        [/frame]
        {SOUND:HIT_AND_MISS bow.ogg bow-miss.ogg -380}
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-After_the_Storm

[+unit_type]
    gender=male,female
    [female]
        profile=unit_image
        gender=female
        name= _ "female^Quenoth Archer"
    [/female]
[/unit_type]


#textdomain wesnoth-utbs

[unit_type]
    id=Quenoth Champion
    name= _ "Quenoth Champion"
    race=elf
    ignore_race_traits=yes
    {TRAIT_STRONG}
    {TRAIT_QUICK}
    {TRAIT_INTELLIGENT}
    {TRAIT_RESILIENT}
    image=units/elves-quenoth/champion.png
    profile="portraits/quenoth/champion.png"
    hitpoints=64
    movement_type=quenoth_foot
    movement=5
    experience=150
    level=3
    alignment=lawful
    advances_to=null
    {AMLA_DEFAULT}
    cost=15
    usage=fighter
    description= _ "Standing at the forefront of most Quenoth spear lines, Champions are those who have mastered the use of the glaive to near perfection. Perhaps only slightly lacking in finesse in strategy, these elves more than compensate with raw power and can force their way through all but the most secure of defenses."
    die_sound={SOUND_LIST:ELF_HIT}
    [abilities]
        {ABILITY_FORMATION}
    [/abilities]
    [attack]
        name=glaive
        description= _"glaive"
        type=pierce
        range=melee
        damage=16
        number=3
        icon=attacks/glaive.png
        [specials]
            {WEAPON_SPECIAL_FIRSTSTRIKE}
        [/specials]
    [/attack]
    [attack]
        name=glaive
        description= _"glaive"
        type=blade
        range=melee
        damage=11
        number=4
        icon=attacks/glaive.png
    [/attack]
    {DEFENSE_ANIM "units/elves-quenoth/champion-defend2.png" "units/elves-quenoth/champion-defend1.png" {SOUND_LIST:ELF_HIT}}
    [attack_anim]
        [filter_attack]
            name=glaive
        [/filter_attack]
        offset=0.0~0.3,0.3~0.5,0.5~0.60,0.60~0.3,0.3~0.0
        start_time=-300
        [frame]
            duration=450
            image="units/elves-quenoth/champion.png"
        [/frame]
        {SOUND:HIT_AND_MISS spear.ogg spear-miss.ogg -100}
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-utbs

[unit_type]
    id=Quenoth Druid
    name= _ "female^Quenoth Druid"
    race=elf
    gender=female
    image=units/elves-quenoth/druid.png
    profile="portraits/quenoth/druid.png"
    hitpoints=50
    movement_type=quenoth_foot
    movement=5
    experience=110
    level=3
    alignment=neutral
    advances_to=Quenoth Shyde
    cost=34
    usage=healer
    [abilities]
        {ABILITY_CURES}
    [/abilities]
    description= _ "Worshippers of the Goddess of Light, Eloh, Druids are considered mysterious even by other elves of the same order. Part of this stems from the Druids’ unusual connection with nature, something nearly wholly absent in a world pervaded by scorched sand. In a brutish world where others train themselves for combat and survival, these elves are the few who remain as healers and caretakers."
    die_sound={SOUND_LIST:ELF_FEMALE_HIT}
    [attack]
        name=staff
        #textdomain wesnoth-units
        description= _"staff"
        #textdomain wesnoth-utbs
        type=impact
        range=melee
        damage=8
        number=2
        range=melee
        icon=attacks/druidstaff.png
    [/attack]
    [attack]
        name=sand
        description= _"sand"
        type=impact
        range=ranged
        damage=6
        number=3
        icon=attacks/sand-storm.png
        [specials]
            {WEAPON_SPECIAL_DAZE}
        [/specials]
    [/attack]
    [attack]
        name=thorns
        #textdomain wesnoth-units
        description= _"thorns"
        #textdomain wesnoth-utbs
        type=pierce
        range=ranged
        damage=7
        number=4
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]
    {DEFENSE_ANIM "units/elves-quenoth/druid-defend2.png" "units/elves-quenoth/druid-defend1.png" {SOUND_LIST:ELF_FEMALE_HIT} }
    [healing_anim]
        start_time=-250
        [frame]
            image="units/elves-quenoth/druid.png:50"
        [/frame]
        [frame]
            image="units/elves-quenoth/druid.png:350"
            halo=halo/elven/shaman-heal-halo-[1~7].png
        [/frame]
        [frame]
            image="units/elves-quenoth/druid.png:50"
        [/frame]
    [/healing_anim]
    [attack_anim]
        [filter_attack]
            name=staff
        [/filter_attack]
        start_time=-250
        [frame]
            image="units/elves-quenoth/druid.png:400"
        [/frame]
        {SOUND:HIT_AND_MISS staff.ogg staff-miss.ogg -125}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sand
        [/filter_attack]
        missile_start_time=-200
        [missile_frame]
            duration=320
            offset=0.75~1.1,1.1~1.25
            halo="projectiles/sand-storm-[1~8].png:40"
            auto_vflip=no
        [/missile_frame]
        start_time=-320
        [frame]
            image="units/elves-quenoth/druid.png:450"
            sound=petrified.ogg
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=thorns
        [/filter_attack]
        missile_start_time=-200
        [missile_frame]
            duration=200
            image="projectiles/thorns.png"
            image_diagonal="projectiles/thorns-ne.png"
        [/missile_frame]
        start_time=-300
        [frame]
            image="units/elves-quenoth/druid.png:500"
            halo="halo/elven/nature-halo[1~8].png"
        [/frame]
        {SOUND:HIT_AND_MISS magic-thorns-[1,2].ogg magic-thorns-miss-[1,2].ogg -100}
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-utbs

[unit_type]
    id=Quenoth Dustbok
    #po: Made-up animal name derived from 'dust' (sand) and 'bok' as in real-world steenbok or springbok antelope
    name= _ "Dustbok"
    image=units/elves-quenoth/dustbok.png
    race=monster
    hitpoints=22
    movement_type=quenoth_horse
    movement=8
    experience=100
    level=0
    alignment=lawful
    advances_to=null
    cost=12
    usage=scout
    description= ""
    die_sound=horse-die.ogg
    [attack]
        name=ram
        #textdomain wesnoth-units
        description= _"ram"
        #textdomain wesnoth-utbs
        type=impact
        range=melee
        damage=4
        number=3
        icon=attacks/blank-attack.png
    [/attack]
    {DEFENSE_ANIM "units/elves-quenoth/dustbok.png" "units/elves-quenoth/dustbok.png" {SOUND_LIST:HORSE_HIT}}
    [attack_anim]
        [filter_attack]
            name=ram
        [/filter_attack]
        offset=0.0~0.3,0.3~0.5,0.5~0.60,0.60~0.3,0.3~0.0
        start_time=-300
        [frame]
            duration=450
            image="units/elves-quenoth/dustbok.png"
        [/frame]
        {SOUND:HIT_AND_MISS club.ogg club-miss.ogg -100}
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-utbs

[unit_type]
    id=Quenoth Fighter
    name= _ "Quenoth Fighter"
    race=elf
    ignore_race_traits=yes
    {TRAIT_STRONG}
    {TRAIT_QUICK}
    {TRAIT_INTELLIGENT}
    {TRAIT_RESILIENT}
    image=units/elves-quenoth/fighter.png
    profile="portraits/quenoth/fighter.png"
    hitpoints=34
    movement_type=quenoth_foot
    movement=5
    experience=40
    level=1
    alignment=lawful
    advances_to=Quenoth Warrior,Quenoth Flanker
    cost=15
    usage=fighter
    description= _ "Long ago, during more prosperous times, Elven warriors favored the use of swords as more elegant, versatile weapons compared to other melee armaments. However, in recent times, the dearth of supplies for smithing has reduced the availability of blade-crafting, necessitating the fashioning of cheaper, more easily repaired weaponry. Quenoth Fighters are remarkably skilled in coordinated groups, where they can counteract the lack of more sophisticated weaponry by forming robust spear ranks capable of repelling nearly any frontal assault."
    die_sound={SOUND_LIST:ELF_HIT}
    [abilities]
        {ABILITY_FORMATION}
    [/abilities]
    [attack]
        name=spear
        #textdomain wesnoth-units
        description= _"spear"
        #textdomain wesnoth-utbs
        type=pierce
        range=melee
        damage=10
        number=2
        icon=attacks/spear.png
        [specials]
            {WEAPON_SPECIAL_FIRSTSTRIKE}
        [/specials]
    [/attack]
    {DEFENSE_ANIM "units/elves-quenoth/fighter-defend-2.png" "units/elves-quenoth/fighter-defend-1.png" {SOUND_LIST:ELF_HIT}}
    [attack_anim]
        [filter_attack]
            name=spear
        [/filter_attack]
        offset=0.0:130,0.0~0.6:170,0.6~0.0:230
        start_time=-300
        [frame]
            image="units/elves-quenoth/fighter-attack[1,2,3,4,5].png:[80,70,100,50,230]"
        [/frame]
        {SOUND:HIT_AND_MISS spear.ogg spear-miss.ogg -100}
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-utbs

[unit_type]
    id=Tauroch Flagbearer
    name= _ "Tauroch Flagbearer"
    image=units/elves-quenoth/flagbearer.png
    image_icon="units/elves-quenoth/flagbearer.png~CROP(0,0,72,72)"
    profile="portraits/quenoth/tauroch_flagbearer.png"
    race=elf
    # Base movement of 4 is too little, but we don't want them to get 6 either
    # if they're quick, so instead they just have 5 movement but can't get quick
    ignore_race_traits=yes
    {TRAIT_STRONG}
    {TRAIT_INTELLIGENT}
    {TRAIT_RESILIENT}
    {TRAIT_DEXTROUS}
    {TRAIT_HEALTHY}
    hitpoints=62
    movement_type=quenoth_beast
    #mostly like a foot Elf, but they are bad at defending in villages
    [defense]
        village=60
    [/defense]
    movement=5
    experience=150
    level=3
    alignment=lawful
    advances_to=null
    {AMLA_DEFAULT}
    cost=18
    usage=mixed fighter
    description= _ "The prestigious Flagbearers spend years out in the open deserts leading their brethren on patrols and hunts, where they forage for supplies while defending their villages from brigands. They are invariably masters of skirmishes and tactics, highly proficient at roaming through the inhospitable sands. Rarely the leaders of large villages or armies, Flagbearers nonetheless have the skill and charisma to act as generals in times of need, when the elves are threatened by something more than mere scavengers or wild beasts."
    die_sound="tauroch-hit-1.ogg,tauroch-hit-2.ogg,tauroch-hit-3.ogg"
    [abilities]
        {ABILITY_LEADERSHIP}
    [/abilities]
    [attack]
        name=ram
        #textdomain wesnoth-units
        description= _"ram"
        type=impact
        range=melee
        damage=11
        number=3
        icon=attacks/ram.png
        [specials]
            {WEAPON_SPECIAL_SHOCK}
        [/specials]
    [/attack]
    [attack]
        name=javelin
        description= _"javelin"
        #textdomain wesnoth-utbs
        type=pierce
        range=ranged
        damage=9
        number=3
        icon=attacks/javelin-human.png
    [/attack]
    {DEFENSE_ANIM "units/elves-quenoth/flagbearer.png" "units/elves-quenoth/flagbearer.png" "tauroch-hit-1.ogg,tauroch-hit-2.ogg,tauroch-hit-3.ogg"}
    [attack_anim]
        [filter_attack]
            name=ram
        [/filter_attack]
        offset=0.0~0.3,0.3~0.5,0.5~0.60,0.60~0.3,0.3~0.0
        start_time=-300
        [frame]
            duration=50
            image="units/elves-quenoth/flagbearer.png"
        [/frame]
        [frame]
            duration=400
            image="units/elves-quenoth/flagbearer.png"
            sound=tail.ogg
        [/frame]
        {SOUND:HIT mace.ogg -100}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=javelin
        [/filter_attack]
        missile_start_time=-150
        [missile_frame]
            duration=150
            image="projectiles/spear-n.png"
            image_diagonal="projectiles/spear-ne.png"
        [/missile_frame]
        start_time=-300
        [frame]
            image="units/elves-quenoth/flagbearer.png:450"
            sound={SOUND_LIST:THROW}
        [/frame]
        {SOUND:HIT spear.ogg -100}
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-utbs

[unit_type]
    id=Quenoth Flanker
    name= _ "Quenoth Flanker"
    race=elf
    ignore_race_traits=yes
    {TRAIT_STRONG}
    {TRAIT_QUICK}
    {TRAIT_INTELLIGENT}
    {TRAIT_RESILIENT}
    image=units/elves-quenoth/flanker.png
    profile="portraits/quenoth/flanker.png"
    hitpoints=44
    movement_type=quenoth_foot
    movement=5
    experience=90
    level=2
    alignment=lawful
    advances_to=Quenoth Ranger
    cost=15
    usage=fighter
    description= _ "Some fighters find that their true talents lie not within rigid spear ranks, but out in the sands, striking at the flanks and rear of enemy forces. Fast and nimble, these elves make use of the weaknesses in enemy formations to disrupt their lines and sow chaos on the battlefield. In more cutthroat conflicts, Flankers even rely on the use of poison — a tool whose use was frowned on by their ancestors — to cripple their foes before charging in for the finish."
    die_sound={SOUND_LIST:ELF_HIT}
    [abilities]
        {ABILITY_SKIRMISHER}
    [/abilities]
    [attack]
        name=sword
        #textdomain wesnoth-units
        description= _"sword"
        #textdomain wesnoth-utbs
        type=blade
        range=melee
        damage=7
        number=4
        icon=attacks/sword-elven.png
    [/attack]
    [attack]
        name=blowgun
        description= _"blowgun"
        type=pierce
        range=ranged
        damage=3
        number=3
        icon=attacks/blowgun.png
        [specials]
            {WEAPON_SPECIAL_POISON}
        [/specials]
    [/attack]
    {DEFENSE_ANIM "units/elves-quenoth/flanker-defend2.png" "units/elves-quenoth/flanker-defend1.png" {SOUND_LIST:ELF_HIT}}
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        offset=0.0~0.3,0.3~0.5,0.5~0.60,0.60~0.3,0.3~0.0
        start_time=-300
        [frame]
            duration=450
            image="units/elves-quenoth/flanker.png"
        [/frame]
        {SOUND:HIT_AND_MISS {SOUND_LIST:SWORD_SWISH} {SOUND_LIST:MISS} -100}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=blowgun
        [/filter_attack]
        missile_start_time=-150
        [missile_frame]
            duration=150
            image="projectiles/missile-n.png~SCALE_SHARP(36,36)"
            image_diagonal="projectiles/missile-ne.png~SCALE_SHARP(36,36)"
        [/missile_frame]
        start_time=-300
        [frame]
            image="units/elves-quenoth/flanker.png:450"
        [/frame]
        {SOUND:HIT_AND_MISS crossbow.ogg crossbow-miss.ogg -300}
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-utbs

[unit_type]
    id=Quenoth Marksman
    name= _ "Quenoth Marksman"
    image=units/elves-quenoth/marksman.png
    profile="portraits/quenoth/marksman.png"
    race=elf
    hitpoints=52
    movement_type=quenoth_horse
    [resistance]
        pierce=120
    [/resistance]
    movement=8
    experience=150
    level=3
    alignment=lawful
    advances_to=null
    {AMLA_DEFAULT}
    cost=18
    usage=scout
    description= _ "In times past, the elves’ supremacy at archery was unquestioned among the other races of the Great Continent. With archery being less viable in a land of scarce cover, however, the skills of the few remaining elven bowmen became suspect, to the point that even their brethren began to believe that archery was more of an outdated relic than a practical tool for battle.

A simple glance at a Quenoth Marksman in action would be enough to dispel this foolish train of thought. Capable of the same legendary feats as their ancestors, these master archers can achieve the same speed and precision as the Sharpshooters of old, all while in full gallop on horseback."
    die_sound=horse-die.ogg
    [abilities]
        {ABILITY_DISENGAGE}
    [/abilities]
    [attack]
        name=sword
        #textdomain wesnoth-units
        description= _"sword"
        type=blade
        range=melee
        damage=8
        number=3
        icon=attacks/sword-elven.png
        movement_used=0
    [/attack]
    [attack]
        name=bow
        description= _"bow"
        #textdomain wesnoth-utbs
        type=pierce
        range=ranged
        damage=9
        number=5
        icon=attacks/bow-elven.png
        movement_used=0
        [specials]
            {WEAPON_SPECIAL_MARKSMAN}
        [/specials]
    [/attack]
    {DEFENSE_ANIM "units/elves-quenoth/marksman.png" "units/elves-quenoth/marksman.png" {SOUND_LIST:HORSE_HIT}}
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        offset=0.0~0.3,0.3~0.5,0.5~0.60,0.60~0.3,0.3~0.0
        start_time=-300
        [frame]
            duration=450
            image="units/elves-quenoth/marksman.png"
        [/frame]
        {SOUND:HIT_AND_MISS {SOUND_LIST:SWORD_SWISH} {SOUND_LIST:MISS} -100}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=bow
        [/filter_attack]
        missile_start_time=-100
        [missile_frame]
            duration=100
            image=projectiles/missile-n.png
            image_diagonal=projectiles/missile-ne.png
        [/missile_frame]
        start_time=-380
        [frame]
            image=units/elves-quenoth/marksman.png:470
        [/frame]
        {SOUND:HIT_AND_MISS bow.ogg bow-miss.ogg -380}
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-After_the_Storm

[+unit_type]
    gender=male,female
    [female]
        profile=unit_image
        gender=female
        name= _ "female^Quenoth Marskman"
    [/female]
[/unit_type]


#textdomain wesnoth-utbs

[unit_type]
    id=Quenoth Mystic
    name= _ "female^Quenoth Mystic"
    race=elf
    gender=female
    image=units/elves-quenoth/mystic/mystic.png
    profile="portraits/quenoth/mystic.png"
    hitpoints=26
    movement_type=quenoth_foot
    movement=5
    experience=28
    level=1
    alignment=neutral
    advances_to=Quenoth Shaman,Quenoth Sun Singer
    cost=18
    usage=healer
    [abilities]
        {ABILITY_HEALS}
    [/abilities]
    description= _ "Like their ancestors, Quenoth Mystics are those who devote themselves to the natural energies that flow through body of Irdya. In the harsh, barren wastelands, however, these elves can no longer rely on the once vast forests from which their forebears drew much of their strength. Instead, sand and sun are the source of the elves’ new powers, which they employ to great effect in their homes in the deserts."
    die_sound={SOUND_LIST:ELF_FEMALE_HIT}
    [attack]
        name=staff
        #textdomain wesnoth-units
        description= _"staff"
        #textdomain wesnoth-utbs
        type=impact
        range=melee
        damage=4
        number=2
        range=melee
        icon=attacks/druidstaff.png
    [/attack]
    [attack]
        name=sand
        description= _"sand"
        type=impact
        range=ranged
        damage=3
        number=2
        icon=attacks/sand-storm.png
        [specials]
            {WEAPON_SPECIAL_DAZE}
        [/specials]
    [/attack]
    {DEFENSE_ANIM "units/elves-quenoth/mystic/mystic-defend-2.png" "units/elves-quenoth/mystic/mystic-defend-1.png" {SOUND_LIST:ELF_FEMALE_HIT} }
    [healing_anim]
        start_time=-450
        [frame]
            image="units/elves-quenoth/mystic/mystic.png:50"
        [/frame]
        [frame]
            image="units/elves-quenoth/mystic/mystic-heal-[1~8].png:70"
            halo=halo/elven/shaman-heal-halo-[1~7].png
        [/frame]
        [frame]
            image="units/elves-quenoth/mystic/mystic.png:50"
        [/frame]
    [/healing_anim]
    [attack_anim]
        [filter_attack]
            name=staff
        [/filter_attack]
        start_time=-250
        [frame]
            image="units/elves-quenoth/mystic/mystic.png:400"
        [/frame]
        {SOUND:HIT_AND_MISS staff.ogg staff-miss.ogg -125}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sand
        [/filter_attack]
        missile_start_time=-200
        [missile_frame]
            duration=320
            offset=0.75~1.1,1.1~1.25
            halo="projectiles/sand-storm-[1~8].png:40"
            auto_vflip=no
        [/missile_frame]
        start_time=-320
        [frame]
            image="units/elves-quenoth/mystic/mystic.png:450"
            sound=petrified.ogg
        [/frame]
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-utbs

[unit_type]
    id=Quenoth Outrider
    name= _ "Quenoth Outrider"
    image=units/elves-quenoth/outrider.png
    profile="portraits/quenoth/outrider.png"
    race=elf
    hitpoints=55
    movement_type=quenoth_horse
    [resistance]
        pierce=120
    [/resistance]
    movement=8
    experience=150
    level=3
    alignment=lawful
    advances_to=null
    {AMLA_DEFAULT}
    cost=18
    usage=scout
    description= _ "Described as riders who ‘rush like the wind’, Outriders breeze across the sands at unmatched speeds. Unlike their lesser brethren, Outriders train themselves for direct combat, wielding sword and bola to strike at injured units and exposed flanks where enemy lines are weakest. A group of these riders is especially dangerous, for against them, both retreat and attrition are futile, a prospect that is only ruinous in the inhospitable desert."
    die_sound=horse-die.ogg
    [abilities]
        {ABILITY_DISENGAGE}
    [/abilities]
    [attack]
        name=sword
        #textdomain wesnoth-units
        description= _"sword"
        #textdomain wesnoth-utbs
        type=blade
        range=melee
        damage=8
        number=4
        icon=attacks/sword-elven.png
        movement_used=0
    [/attack]
    [attack]
        name=bolas
        description= _"bolas"
        type=impact
        range=ranged
        damage=11
        number=3
        icon=attacks/bolas.png
        movement_used=0
        [specials]
            {WEAPON_SPECIAL_SLOW}
        [/specials]
    [/attack]
    {DEFENSE_ANIM "units/elves-quenoth/outrider-defend2.png" "units/elves-quenoth/outrider-defend1.png" {SOUND_LIST:HORSE_HIT}}
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        offset=0.0~0.3,0.3~0.5,0.5~0.60,0.60~0.3,0.3~0.0
        start_time=-300
        [frame]
            duration=450
            image="units/elves-quenoth/outrider.png"
        [/frame]
        {SOUND:HIT_AND_MISS {SOUND_LIST:SWORD_SWISH} {SOUND_LIST:MISS} -100}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=bolas
        [/filter_attack]
        missile_start_time=-150
        [missile_frame]
            duration=150
            image=projectiles/bolas-n.png
            image_diagonal=projectiles/bolas-ne.png
        [/missile_frame]
        start_time=-300
        [frame]
            image=units/elves-quenoth/outrider.png:400
        [/frame]
        {SOUND:HIT_AND_MISS hatchet.wav hatchet-miss.wav -300}
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-utbs

[unit_type]
    id=Quenoth Pathfinder
    name= _ "Quenoth Pathfinder"
    image=units/elves-quenoth/pathfinder.png
    profile="portraits/quenoth/pathfinder.png"
    race=elf
    hitpoints=42
    movement_type=quenoth_horse
    [resistance]
        pierce=120
    [/resistance]
    movement=8
    experience=80
    level=2
    alignment=lawful
    advances_to=Quenoth Outrider
    cost=18
    usage=scout
    description= _ "In times past, turning and fleeing from an engagement was a risky tactic, for there were few means to avoid or block enemy archers shooting from behind. In the desert, however, unstable footing and lack of cover make it far more challenging for most fighters to strike from range. The elusive Pathfinders make use of this by riding the exceptionally agile dustboks, who are highly adapted to traversing the dunes and can evade most attacks with their swift movements. The difficulty in pinning these riders down often tries the patience of their enemies, who are provoked into recklessly giving chase — inevitably into many a deadly trap."
    die_sound=horse-die.ogg
    [abilities]
        {ABILITY_DISENGAGE}
    [/abilities]
    [attack]
        name=sword
        #textdomain wesnoth-units
        description= _"sword"
        #textdomain wesnoth-utbs
        type=blade
        range=melee
        damage=7
        number=4
        icon=attacks/sword-elven.png
        movement_used=0
    [/attack]
    [attack]
        name=bolas
        #textdomain wesnoth-units
        description= _"bolas"
        #textdomain wesnoth-utbs
        type=impact
        range=ranged
        damage=9
        number=2
        icon=attacks/bolas.png
        movement_used=0
        [specials]
            {WEAPON_SPECIAL_SLOW}
        [/specials]
    [/attack]
    {DEFENSE_ANIM "units/elves-quenoth/pathfinder-defend2.png" "units/elves-quenoth/pathfinder-defend1.png" {SOUND_LIST:HORSE_HIT}}
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        offset=0.0~0.3,0.3~0.5,0.5~0.60,0.60~0.3,0.3~0.0
        start_time=-300
        [frame]
            duration=450
            image="units/elves-quenoth/pathfinder.png"
        [/frame]
        {SOUND:HIT_AND_MISS {SOUND_LIST:SWORD_SWISH} {SOUND_LIST:MISS} -100}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=bolas
        [/filter_attack]
        missile_start_time=-150
        [missile_frame]
            duration=150
            image=projectiles/bolas-n.png
            image_diagonal=projectiles/bolas-ne.png
        [/missile_frame]
        start_time=-300
        [frame]
            image=units/elves-quenoth/pathfinder.png:400
        [/frame]
        {SOUND:HIT_AND_MISS hatchet.wav hatchet-miss.wav -300}
    [/attack_anim]
[/unit_type]

# temporary, to avoid breaking saves from 1.13.x
[unit_type]
    id=Quenoth Horseman
    [base_unit]
        id=Quenoth Pathfinder
    [/base_unit]
    hide_help=yes
    do_not_list=yes
[/unit_type]