#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Giant Mushroom
    name= _ "Giant Mushroom"
    race=monster
    image="units/monsters/giant-mushroom.png"
    hitpoints=63
    movement_type=treefolk
    movement=1
    [movement_costs]
        deep_water={UNREACHABLE}
        shallow_water={UNREACHABLE}
        reef={UNREACHABLE}
        swamp_water={UNREACHABLE}
        flat={UNREACHABLE}
        sand={UNREACHABLE}
        forest={UNREACHABLE}
        hills={UNREACHABLE}
        mountains={UNREACHABLE}
        village={UNREACHABLE}
        castle={UNREACHABLE}
        cave={UNREACHABLE}
        frozen={UNREACHABLE}
        unwalkable={UNREACHABLE}
        impassable={UNREACHABLE}
        fungus={UNREACHABLE}
    [/movement_costs]
    [defense]
        fungus=60
        cave=60
    [/defense]
    experience=100
    {AMLA_DEFAULT}
    level=2
    alignment=chaotic
    advances_to=null
    cost=90
    usage=fighter
    undead_variation=null
    description="FIXME" # wmllint: ignore no spellcheck
    die_sound=wose-hit.ogg
    {DEFENSE_ANIM "units/monsters/giant-mushroom.png" "units/monsters/giant-mushroom.png" "wose-hit.ogg" }
    [attack]
        name=crush
        description={TSTR_ATTACK_NAME_CRUSH}
        icon=attacks/crush-wose.png
        type=impact
        range=melee
        damage=10
        number=2
    [/attack]
    [attack]
        name=tentacle
        description={TSTR_ATTACK_NAME_TENTACLE}
        type=pierce
        range=melee
        damage=11
        number=3
    [/attack]
    [attack_anim]
        [filter_attack]
            name=crush
        [/filter_attack]
        start_time=-500
        [if]
            hits=yes
            [frame]
                duration=400
                image="units/monsters/giant-mushroom.png"
                sound=wose-attack.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=400
                image="units/monsters/giant-mushroom.png"
                sound=wose-miss.ogg
            [/frame]
        [/else]
        [frame]
            duration=150
            image="units/monsters/giant-mushroom.png"
        [/frame]
        [frame]
            duration=75
            image="units/monsters/giant-mushroom.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=tentacle
        [/filter_attack]
        start_time=-225
        [frame]
            duration=75
            image="units/monsters/giant-mushroom.png"
        [/frame]
        [frame]
            duration=75
            image="units/monsters/giant-mushroom.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=100
                image="units/monsters/giant-mushroom.png"
                sound=tail.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=100
                image="units/monsters/giant-mushroom.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=75
            image="units/monsters/giant-mushroom.png"
        [/frame]
        [frame]
            duration=50
            image="units/monsters/giant-mushroom.png"
        [/frame]
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-After_the_Storm

#ifdef CAMPAIGN_AFTER_THE_STORM_EPISODE_III
[unit_type]
    id=Lumeril Glyph
    name= _ "Lumeril Glyph"
    race=monster
    {TRAIT_ELEMENTAL}
    image="units/monsters/lumeril-glyph.png"
    halo="halo/illuminates-aura.png~O(0.4)"
    hitpoints=99
    movement_type=none
    [resistance]
        blade=0
        pierce=0
        impact=0
        fire=0
        cold=0
        # Unusually low resistance to arcane damage.
        arcane=130
    [/resistance]
    movement=0
    {NO_EXPERIENCE_UNIT}
    # This unit is only level zero so units don't gain any
    # experience from surviving an attack.
    level=0
    zoc=yes
    alignment=neutral
    cost=660
    usage=archer
    hide_help=true
    [abilities]
        {ABILITY_ILLUMINATES}
        {ABILITY_REGENERATES}
    [/abilities]
    description= _ "This ethereal projection was created by a powerful demoness, follower of the path of Light. As such, it is invulnerable to physical attacks."

    [defend]
        start_time=-125
        sound_start_time=-26
        auto_hflip=no

        [frame]
            duration=250
            image="units/monsters/lumeril-glyph.png"
        [/frame]

        [sound_frame]
            duration=1
        [/sound_frame]

        [if]
            hits=hit
            [sound_frame]
                duration=150
                sound=gate.ogg
            [/sound_frame]
        [/if]
        [else]
            hits=miss,kill
            [sound_frame]
                duration=150
            [/sound_frame]
        [/else]
    [/defend]

    [attack]
        name=lightbeam
        description=_"lightbeam" # wmllint: no spellcheck
        type=arcane
        range=melee
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=14
        number=1
    [/attack]
    [attack]
        name=lightbeam
        description=_"lightbeam" # wmllint: no spellcheck
        type=arcane
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=14
        number=1
    [/attack]

    [attack_anim]
        [filter_attack]
            name=lightbeam
        [/filter_attack]

        offset=0.0
        auto_hflip=no

        {MISSILE_FRAME_LIGHT_BEAM}

        [frame]
            begin=-76
            end=-75
        [/frame]

        [if]
            hits=yes
            [frame]
                begin=-75
                end=0
                sound={SOUND_LIST:HOLY}
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-75
                end=0
                sound={SOUND_LIST:HOLY_MISS}
            [/frame]
        [/else]
    [/attack_anim]

    [death]
        start_time=0
        auto_hflip=no
        [frame]
            duration=200
            image="units/monsters/lumeril-glyph-break-1.png"
        [/frame]
        [frame]
            duration=250
            image="units/monsters/lumeril-glyph-break-2.png"
        [/frame]
        [frame]
            duration=275
            image="units/monsters/lumeril-glyph-break-3.png"
        [/frame]
        [frame]
            duration=250
            image="units/monsters/lumeril-glyph-break-4.png"
            sound=break.ogg
        [/frame]
        [frame]
            duration=250
            image="units/monsters/lumeril-glyph-break-5.png"
        [/frame]
    [/death]

    [standing_anim]
        start_time=0
        [frame]
            image="misc/blank-hex.png:4000"
        [/frame]
        [glyph_frame]
            auto_hflip=no
            auto_vflip=no
            image="units/monsters/lumeril-glyph.png:4000"
            y="0~4:1000,4~7:1000,7~4:1000,4~0:1000"
        [/glyph_frame]
    [/standing_anim]

    [variation]
        variation_id=anim1
        inherit=yes
        # Deliberately left empty
    [/variation]

    [variation]
        variation_id=anim2
        inherit=yes
        [standing_anim]
            [glyph_frame]
                y="4~7:1000,7~4:1000,4~0:1000,0~4:1000"
            [/glyph_frame]
        [/standing_anim]
    [/variation]

    [variation]
        variation_id=anim3
        inherit=yes
        [standing_anim]
            [glyph_frame]
                y="7~4:1000,4~0:1000,0~4:1000,4~7:1000"
            [/glyph_frame]
        [/standing_anim]
    [/variation]

    [variation]
        variation_id=anim4
        inherit=yes
        [standing_anim]
            [glyph_frame]
                y="4~0:1000,0~4:1000,4~7:1000,7~4:1000"
            [/glyph_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=Shaxthal Custodian Drone
    name= _ "Custodian Drone"
    race=shaxthal
    image="units/shaxthal/drone-custodian.png"
    image_icon="units/shaxthal/drone-custodian.png~SCALE(72,72)"
    hitpoints=88
    movement_type=biomechanical_drone
    movement=8
    experience=200
    level=4
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=81
    usage=mixed fighter
    # Weaker than their cousins to most physical damage types
    [resistance]
        blade=70
        impact=90
        cold=70
        fire=90
    [/resistance]
    description= _ "This massive airborne Shaxthal creature was created with the purpose of protecting key locations with its powerful raining fire attack. Combining the strengths of the more generic drones, a formidable foe like this is best approached with extreme caution."
    die_sound={SOUND_LIST:BIOMECHANICAL_DIE}
    {DEFENSE_ANIM "units/shaxthal/drone-custodian.png" "units/shaxthal/drone-custodian.png" {SOUND_LIST:BIOMECHANICAL_HIT} }
    [abilities]
        {ABILITY_SUBMERGE}
    [/abilities]
    [attack]
        name=battle claws
        description={TSTR_ATTACK_NAME_BATTLE_CLAWS}
        icon="attacks/claws-drake.png"
        type=blade
        range=melee
        damage=11
        number=3
    [/attack]
    [attack]
        name=energy shock
        description= _ "energy shock"
        icon=attacks/energy-shock.png
        type=impact
        range=ranged
        damage=13
        number=4
    [/attack]
    [attack]
        name=firefly rain
        description= _ "firefly rain"
        icon=attacks/firefly-rain.png
        type=fire
        range=ranged
        damage=7
        number=14
        [specials]
            {WEAPON_SPECIAL_SWARM}
        [/specials]
    [/attack]
    [attack_anim]
        [filter_attack]
            name=battle claws
        [/filter_attack]
        offset=0.0~-0.75:225,-0.75~1.0:175,1.0~0.0:100
        [frame]
            begin=-400
            end=-150
            image="units/shaxthal/drone-custodian.png"
        [/frame]
        [if]
            hits=no
            [frame]
                begin=-150
                end=-50
                image="units/shaxthal/drone-custodian.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                begin=-150
                end=-50
                image="units/shaxthal/drone-custodian.png"
                sound=claws.ogg
            [/frame]
        [/else]
        [frame]
            begin=-50
            end=100
            image="units/shaxthal/drone-custodian.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=energy shock
        [/filter_attack]
        {MISSILE_FRAME_ENERGY_SHOCK}
        [frame]
            begin=-300
            end=-200
            image="units/shaxthal/drone-custodian.png"
            sound=shaxthal-energy-prelude.ogg
        [/frame]
        [frame]
            begin=-200
            end=100
            image="units/shaxthal/drone-custodian.png"
            sound=shaxthal-energy-fire.ogg
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=firefly rain
        [/filter_attack]
        start_time=-400
        offset=0.0
        [frame]
            duration=200
            image="units/shaxthal/drone-custodian.png"
            sound=shaxthal-energy-fire.ogg
        [/frame]
        [if]
            hits=yes
            direction=n
            [frame]
                duration=200
                image="units/shaxthal/drone-custodian.png"
                sound=fire.wav
            [/frame]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_NORTH 0 20}
        [/if]
        [else]
            hits=yes
            direction=ne,nw
            [frame]
                duration=200
                image="units/shaxthal/drone-custodian.png"
                sound=fire.wav
            [/frame]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_DIAG_NORTH 0 20}
        [/else]
        [else]
            hits=yes
            direction=se,sw
            [frame]
                duration=200
                image="units/shaxthal/drone-custodian.png"
                sound=fire.wav
            [/frame]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_SOUTH 0 0}
        [/else]
        [else]
            hits=yes
            direction=se,sw
            [frame]
                duration=200
                image="units/shaxthal/drone-custodian.png"
                sound=fire.wav
            [/frame]
            {MISSILE_FRAME_MUZZLE_FLARE_HIT_DIAG_SOUTH 0 0}
        [/else]
        [else]
            hits=no
            [frame]
                duration=200
                image="units/shaxthal/drone-custodian.png"
                sound=torch-miss.ogg
            [/frame]
        [/else]
        [frame]
            duration=200
            image="units/shaxthal/drone-custodian.png"
        [/frame]
    [/attack_anim]

    [death]
        start_time=0
        die_sound_start_time=0
        auto_vflip=no

        [die_sound_frame]
            duration=600
            sound=explosion.ogg
        [/die_sound_frame]
        [die_sound_frame]
            duration=800
            sound={SOUND_LIST:BIOMECHANICAL_HIT}
        [/die_sound_frame]
        [die_sound_frame]
            duration=400
            sound=explosion.ogg
        [/die_sound_frame]
        [die_sound_frame]
            duration=800
            sound={SOUND_LIST:BIOMECHANICAL_HIT}
        [/die_sound_frame]
        [die_sound_frame]
            duration=900
            sound=explosion.ogg
        [/die_sound_frame]
        [die_sound_frame]
            duration=600
            sound={SOUND_LIST:BIOMECHANICAL_DIE}
        [/die_sound_frame]
        [die_sound_frame]
            duration=800
            sound=explosion.ogg
        [/die_sound_frame]

        {BOSS_BURST_FRAME 1    0  -9  17}
        {BOSS_BURST_FRAME 2  600  18   0}
        {BOSS_BURST_FRAME 3 1200  -9 -18}
        {BOSS_BURST_FRAME 4 1800   9  17}
        {BOSS_BURST_FRAME 5 2400   8 -18}
        {BOSS_BURST_FRAME 6 3000 -18   0}

        {BOSS_EXPLOSION_FRAME 1 1800  -9  17}
        {BOSS_EXPLOSION_FRAME 2 2300  18   0}
        {BOSS_EXPLOSION_FRAME 3 2800  -9 -18}
        {BOSS_EXPLOSION_FRAME 4 3300   9  17}
        {BOSS_EXPLOSION_FRAME 5 3800   8 -18}
        {BOSS_EXPLOSION_FRAME 6 4300 -18   0}

        [frame]
            duration=2500
            image="units/shaxthal/drone-custodian.png"
            blend_color=255,255,255
            blend_ratio=0.0~1.0
        [/frame]
        [frame]
            duration=2600
            image="units/shaxthal/drone-custodian.png"
            blend_color=255,255,255
            blend_ratio=1.0
            alpha=1.0~0.0
        [/frame]
        [frame]
            duration=1
            image="misc/blank-hex.png"
        [/frame]
    [/death]
[/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=Shaxthal Demolisher Drone
    name= _ "Demolisher Drone"
    race=shaxthal
    image="units/shaxthal/drone-demolition.png"
    image_icon="units/shaxthal/drone-demolition.png~SCALE(72,72)"
    hitpoints=58
    movement_type=biomechanical_drone
    movement=5
    experience=200
    level=4
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=130
    usage=mixed fighter
    description="" # wmllint: ignore
    die_sound={SOUND_LIST:BIOMECHANICAL_DIE}
    {DEFENSE_ANIM "units/shaxthal/drone-demolition.png" "units/shaxthal/drone-demolition.png" {SOUND_LIST:BIOMECHANICAL_HIT} }
    [abilities]
        {ABILITY_DEMOLITION}
        {ABILITY_SUBMERGE}
    [/abilities]
    [resistance]
        blade=70
        impact=80
        cold=80
    [/resistance]
    [attack]
        name=fangs
        description={TSTR_ATTACK_NAME_FANGS}
        type=pierce
        range=melee
        damage=10
        number=2
        [specials]
            {WEAPON_SPECIAL_POISON}
        [/specials]
    [/attack]
    [attack]
        name=drill
        description= _ "drill"
        icon=attacks/blank-attack.png # FIXME
        type=pierce
        range=melee
        damage=14
        number=2
        [specials]
            {WEAPON_SPECIAL_FIRSTSTRIKE}
        [/specials]
    [/attack]
    [attack]
        name=tail
        description={TSTR_ATTACK_NAME_TAIL}
        icon=attacks/mace-spiked.png
        type=impact
        range=melee
        damage=16
        number=1
    [/attack]
    [attack]
        name=energy burst
        description= _ "energy burst"
        icon=attacks/energy-shock.png
        type=impact
        range=ranged
        damage=15
        number=2
    [/attack]
    [attack_anim]
        [filter_attack]
            name=tail
        [/filter_attack]
        start_time=-300
        [frame]
            duration=50
            image="units/shaxthal/drone-demolition.png"
        [/frame]
        [if]
            hits=no
            [frame]
                duration=150
                image="units/shaxthal/drone-demolition.png"
                sound={SOUND_LIST:MISS}
            [/frame]
            [frame]
                duration=300
                image="units/shaxthal/drone-demolition.png"
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                duration=150
                image="units/shaxthal/drone-demolition.png"
                sound=tail.ogg
            [/frame]
            [frame]
                duration=300
                image="units/shaxthal/drone-demolition.png"
                sound=mace.wav
            [/frame]
        [/else]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=drill
        [/filter_attack]
        start_time=-200
        [frame]
            duration=50
            image="units/shaxthal/drone-demolition.png"
        [/frame]
        [if]
            hits=no
            [frame]
                duration=250
                image="units/shaxthal/drone-demolition.png"
                sound=spear-miss.ogg
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                duration=250
                image="units/shaxthal/drone-demolition.png"
                sound=spear.ogg
            [/frame]
        [/else]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=fangs
        [/filter_attack]
        start_time=-300
        [frame]
            duration=150
            image="units/shaxthal/drone-demolition.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=250
                image="units/shaxthal/drone-demolition.png"
                sound=bite.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=250
                image="units/shaxthal/drone-demolition.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=100
            image="units/shaxthal/drone-demolition.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=energy burst
        [/filter_attack]
        start_time=-300
        {MISSILE_FRAME_ENERGY_SHOCK}
        [frame]
            duration=100
            image="units/shaxthal/drone-demolition.png"
            sound=shaxthal-energy-prelude.ogg
        [/frame]
        [frame]
            duration=300
            image="units/shaxthal/drone-demolition.png"
            sound=shaxthal-energy-fire.ogg
        [/frame]
    [/attack_anim]
[/unit_type]
#endif

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


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Shaxthal Infiltrator
    [base_unit]
        id=Faerie Avatar
    [/base_unit]
    name= _ "female^Infiltrator"
    race=shaxthal
    image="units/faeries/ivyel-damaged.png"
    #profile="portraits/ivyel-damaged.png"
    hitpoints=103
    hide_help=true
    undead_variation=null
    {TRAIT_BIOMECHANICAL}
    description= _ "A creature made of flesh and steel, with the power of the arcane flame bestowed upon her and unconditional servitude as her only goal in life, this hybrid Shaxthal being was created and enhanced for the purpose of posing as the elvenkind savior to provide the forces of Uria with new and powerful allies."

    [resistance]
        blade=80
        pierce=70
        impact=100
        cold=90
        arcane=100
    [/resistance]

    {DEFENSE_ANIM_RANGE "units/faeries/ivyel-damaged.png" "units/faeries/ivyel-damaged.png" {SOUND_LIST:ELF_FEMALE_HIT} melee }
    {DEFENSE_ANIM_ELVEN_RANGE "units/faeries/ivyel-damaged.png" "units/faeries/ivyel-damaged.png" {SOUND_LIST:ELF_FEMALE_HIT} ranged }

    [attack_anim]
        [filter_attack]
            name=arcane touch
        [/filter_attack]
        [frame]
            image="units/faeries/ivyel-damaged.png"
        [/frame]
        [frame]
            image="units/faeries/ivyel-damaged.png"
        [/frame]
    [/attack_anim]

    [attack_anim]
        [filter_attack]
            name=gossamer
        [/filter_attack]
        [frame]
            image="units/faeries/ivyel-damaged.png"
        [/frame]
    [/attack_anim]

    [attack_anim]
        [filter_attack]
            name=ethereal storm
        [/filter_attack]
        [frame]
            image="units/faeries/ivyel-damaged.png"
        [/frame]
    [/attack_anim]
[/unit_type]

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


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Shaxthal Hive Queen
    name= _ "Hive Queen"
    race=shaxthal
    image="units/shaxthal/queen.png"
    bar_offset_x,bar_offset_y=0,0
    image_icon="units/shaxthal/queen.png~CROP(28,0,128,128)~SCALE(72,72)"
    hitpoints=144
    movement_type=biomechanical_drone
    movement=5
    experience=250
    level=5
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=190
    usage=mixed fighter
    hide_help=true
    description= _ "One of the greatest mysteries surrounding Shaxthalkind is their ability to follow orders from the servants of Uria, even though they normally appear to be chiefly insentient, irrational creatures with no ability to understand or communicate with other lifeforms. Following the destruction of the hive in the ruins of Weldyn, it’s been theorized by some that their behavior could be driven by commands from a single controlling entity of their own species."
    die_sound=lich-die.ogg
    {DEFENSE_ANIM "units/shaxthal/queen.png" "units/shaxthal/queen.png" {SOUND_LIST:LICH_HIT} }
    [abilities]
        {ABILITY_PROTECTION}
        {ABILITY_REGENERATES}
        {ABILITY_SUBMERGE}
        {ABILITY_ABSORB_DAMAGE}
    [/abilities]
    [resistance]
        blade=70
        cold=80
        fire=100
        arcane=100
    [/resistance]
    [attack]
        name=fangs
        description={TSTR_ATTACK_NAME_FANGS}
        type=pierce
        range=melee
        damage=28
        number=2
        [specials]
            {WEAPON_SPECIAL_POISON}
            {WEAPON_SPECIAL_SLOW}
        [/specials]
    [/attack]
    [attack]
        name=energy burst
        description= _ "energy burst"
        icon=attacks/energy-shock.png
        type=impact
        range=ranged
        damage=18
        number=3
        [specials]
            {WEAPON_SPECIAL_MARKSMAN}
            {WEAPON_SPECIAL_SHOCK}
        [/specials]
    [/attack]
    [attack_anim]
        [filter_attack]
            name=fangs
        [/filter_attack]
        start_time=-150
        [if]
            hits=yes
            [frame]
                duration=100
                image="units/shaxthal/queen.png"
                sound=bite.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=100
                image="units/shaxthal/queen.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=150
            image="units/shaxthal/queen.png"
        [/frame]
        [frame]
            duration=100
            image="units/shaxthal/queen.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=energy burst
        [/filter_attack]
        start_time=-300
        blast_start_time=-1
        blast_offset=1.0
        blast_auto_vflip=no
        [blast_frame]
            duration=1
        [/blast_frame]
        [if]
            hits=yes
            [blast_frame]
                duration=540
                halo="projectiles/fireball-impact-7.png:60,projectiles/fireball-impact-8.png:60,projectiles/fireball-impact-9.png:60,projectiles/fireball-impact-10.png:60,projectiles/fireball-impact-11.png:60,projectiles/fireball-impact-12.png:60,projectiles/fireball-impact-13.png:60,projectiles/fireball-impact-14.png:60,projectiles/fireball-impact-15.png:60,projectiles/fireball-impact-16.png:60"
            [/blast_frame]
            [blast_frame]
                duration=1
            [/blast_frame]
        [/if]

        {MISSILE_FRAME_ENERGY_SHOCK}

        [frame]
            duration=100
            image="units/shaxthal/queen.png"
            sound=shaxthal-energy-prelude.ogg
        [/frame]
        [frame]
            duration=300
            image="units/shaxthal/queen.png"
            sound=shaxthal-energy-fire.ogg
        [/frame]
    [/attack_anim]

    [death]
        start_time=0
        die_sound_start_time=0
        auto_vflip=no

        [die_sound_frame] # 0 600
            duration=600
            sound=explosion.ogg
        [/die_sound_frame]
        [die_sound_frame] # 600 700
            duration=100
            sound={SOUND_LIST:LICH_HIT}
        [/die_sound_frame]
        [die_sound_frame] # 700 1400
            duration=700
            sound={SOUND_LIST:BIOMECHANICAL_HIT}
        [/die_sound_frame]
        [die_sound_frame] # 1400 1700
            duration=300
            sound=explosion-big.ogg
        [/die_sound_frame]
        [die_sound_frame] # 1700 1800
            duration=100
            sound={SOUND_LIST:LICH_HIT}
        [/die_sound_frame]
        [die_sound_frame] # 1800 2200
            duration=400
            sound={SOUND_LIST:BIOMECHANICAL_HIT}
        [/die_sound_frame]
        [die_sound_frame] # 2200 2600
            duration=400
            sound=gun-energy-huge-fire-prelude.ogg
        [/die_sound_frame]
        [die_sound_frame] # 2600 3400
            duration=800
            sound=explosion.ogg
        [/die_sound_frame]
        [die_sound_frame] # 3400 3600
            duration=200
            sound=lich-die.ogg
        [/die_sound_frame]
        [die_sound_frame] # 3600 3700
            duration=100
            sound=magic-dark.ogg
        [/die_sound_frame]
        [die_sound_frame] # 3700
            duration=100
            sound=dragonstick.ogg
        [/die_sound_frame]
        [die_sound_frame] # 3800
            duration=100
            sound=explosion-big.ogg
        [/die_sound_frame]
        [die_sound_frame] # 3900
            duration=100
            sound=dragonstick.ogg
        [/die_sound_frame]

        {BOSS_BURST_FRAME 1    0  -9  17}
        {BOSS_BURST_FRAME 2  600  18   0}
        {BOSS_BURST_FRAME 3 1200  -9 -18}
        {BOSS_BURST_FRAME 4 1800   9  17}
        {BOSS_BURST_FRAME 5 2400   8 -18}
        {BOSS_BURST_FRAME 6 3000 -18   0}
        {BOSS_BURST_FRAME 7 3600  18  17}

        {BOSS_EXPLOSION_FRAME 1 1800  -9  17}
        {BOSS_EXPLOSION_FRAME 2 2300  18   0}
        {BOSS_EXPLOSION_FRAME 3 2800  -9 -18}
        {BOSS_EXPLOSION_FRAME 4 3300   9  17}
        {BOSS_EXPLOSION_FRAME 5 3800   8 -18}

#define QUEEN_BURST_COLOR_MOD _NAMESTEM
    {BOSS_BURST_FRAME_IMAGE_MOD {_NAMESTEM} "~CS(96,-32,-64)"}
#enddef

        {BOSS_BURST_FRAME inN   3750    0  -18} {QUEEN_BURST_COLOR_MOD inN  }
        {BOSS_BURST_FRAME inE   3750   18    0} {QUEEN_BURST_COLOR_MOD inE  }
        {BOSS_BURST_FRAME inS   3750    0   18} {QUEEN_BURST_COLOR_MOD inS  }
        {BOSS_BURST_FRAME inW   3750  -18    0} {QUEEN_BURST_COLOR_MOD inW  }

        {BOSS_BURST_FRAME outNE 3850   36  -36} {QUEEN_BURST_COLOR_MOD outNE}
        {BOSS_BURST_FRAME outSE 3850   36   36} {QUEEN_BURST_COLOR_MOD outSE}
        {BOSS_BURST_FRAME outSW 3850  -36   36} {QUEEN_BURST_COLOR_MOD outSW}
        {BOSS_BURST_FRAME outNW 3850  -36  -36} {QUEEN_BURST_COLOR_MOD outNW}

        {BOSS_BURST_FRAME farN  3900    0  -96} {QUEEN_BURST_COLOR_MOD farN }
        {BOSS_BURST_FRAME farNE 3950   72  -72} {QUEEN_BURST_COLOR_MOD farNE}
        {BOSS_BURST_FRAME farE  3900   96    0} {QUEEN_BURST_COLOR_MOD farE }
        {BOSS_BURST_FRAME farSE 4000   72   72} {QUEEN_BURST_COLOR_MOD farSE}
        {BOSS_BURST_FRAME farS  3900    0   96} {QUEEN_BURST_COLOR_MOD farS }
        {BOSS_BURST_FRAME farSW 4050  -72   72} {QUEEN_BURST_COLOR_MOD farSW}
        {BOSS_BURST_FRAME farW  3900  -96    0} {QUEEN_BURST_COLOR_MOD farW }
        {BOSS_BURST_FRAME farNW 4000  -72  -72} {QUEEN_BURST_COLOR_MOD farNW}

#undef QUEEN_BURST_COLOR_MOD

        [frame]
            duration=4100
            image="units/shaxthal/queen.png"
            blend_color=255,128,128
            blend_ratio="0.0~1.0:3700,1.0"
        [/frame]
        [frame]
            duration=1
            image="misc/blank-hex.png"
        [/frame]

        #
        # NOTE: the following are not true haloes because otherwise we can't
        #       specify an animated alpha blending sequence for them without
        #       spamming frame definitions and ~O() image modifications.
        #
        #       We render them on layer 100 so they draw atop the inner
        #       portion of cave walls, etc.
        #

#define QUEEN_AURA_FRAME _NUM _START_TIME _DURATION _MOD
    heart_aura_{_NUM}_start_time={_START_TIME}
    heart_aura_{_NUM}_layer=100
    [heart_aura_{_NUM}_frame]
        duration={_DURATION}
        image="halo/heart-aura.png"+{_MOD}
        alpha="0.0~0.5,0.5~1.0,1.0,1.0"
    [/heart_aura_{_NUM}_frame]
    [heart_aura_{_NUM}_frame]
        duration=1
        image="misc/blank-hex.png"
    [/heart_aura_{_NUM}_frame]
#enddef

        {QUEEN_AURA_FRAME 1   0 4200 ""}

        {QUEEN_AURA_FRAME 2 200 4000 "~SCALE(450,450)~BL(1)"}

        {QUEEN_AURA_FRAME 3 400 3800 "~SCALE(675,675)~BL(2)"}

#undef QUEEN_AURA_FRAME
    [/death]
[/unit_type]

# 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=Shaxthal Deathbringer
    name= _ "Deathbringer"
    race=shaxthal
    image="units/shaxthal/deathbringer-1.png"
    hitpoints=172
    movement_type=biomechanical_drone
    movement=6
    experience=200
    level=4
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=130
    usage=mixed fighter
    hide_help=true
    # wmllint: notecheck off
    description="" # wmllint: ignore
    die_sound={SOUND_LIST:BIOMECHANICAL_DIE}
    {DEFENSE_ANIM "units/shaxthal/deathbringer-1.png" "units/shaxthal/deathbringer-1.png" {SOUND_LIST:BIOMECHANICAL_HIT} }
    [abilities]
        {ABILITY_SUBMERGE}
        {ABILITY_FEEDING}
    [/abilities]

    [attack]
        name=claws
        description={I18N:ATTACK_CLAWS}
        icon=attacks/claws-drake.png
        type=blade
        range=melee
        damage=16
        number=3
        [specials]
            {WEAPON_SPECIAL_POISON}
        [/specials]
    [/attack]

    [attack]
        name=concussion beam
        description= _ "concussion beam"
        icon=attacks/energy-shock.png
        type=impact
        range=ranged
        damage=80
        number=1
        attack_weight=3.0
        [specials]
            {WEAPON_SPECIAL_SLOW}
            {WEAPON_SPECIAL_STUN}
            {WEAPON_SPECIAL_ALWAYS_HITS}
        [/specials]
    [/attack]

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

        [frame]
            duration=400
            image="units/shaxthal/deathbringer-1.png"
        [/frame]

        {SOUND:HIT_AND_MISS claws.ogg {SOUND_LIST:MISS} -150}
    [/attack_anim]

    [attack_anim]
        [filter_attack]
            name=concussion beam
        [/filter_attack]

        {MISSILE_FRAME_LIGHT_BEAM}

        missile_halo_mod="~BLEND(255,255,0,0.50)~O(0.25)"

        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]

    # Utility variation, doesn't do anything other than make variation
    # randomization simpler to write.
    [variation]
        variation_id=base
        inherit=yes
    [/variation]

    [variation]
        variation_id=cyclops
        inherit=yes
        image="units/shaxthal/deathbringer-2.png"
        {DEFENSE_ANIM "units/shaxthal/deathbringer-2.png" "units/shaxthal/deathbringer-2.png" {SOUND_LIST:BIOMECHANICAL_HIT} }

        [attack_anim]
            [frame]
                image="units/shaxthal/deathbringer-2.png"
            [/frame]
        [/attack_anim]
    [/variation]

    [variation]
        variation_id=beast
        inherit=yes
        image="units/shaxthal/deathbringer-3.png"
        {DEFENSE_ANIM "units/shaxthal/deathbringer-3.png" "units/shaxthal/deathbringer-3.png" {SOUND_LIST:BIOMECHANICAL_HIT} }

        [attack_anim]
            [frame]
                image="units/shaxthal/deathbringer-3.png"
            [/frame]
        [/attack_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=Shaxthal Deathbringer Alpha
    # po: That's a greek alpha. Translate as it seems more
    # po: convenient for your target language/font.
    name= _ "Deathbringer α"
    race=shaxthal
    image="units/shaxthal/deathbringer-alpha.png"
    hitpoints=280
    movement_type=biomechanical_drone
    movement=6
    {NO_EXPERIENCE_UNIT}
    level=6
    alignment=neutral
    cost=211
    usage=mixed fighter
    hide_help=true
    [resistance]
        arcane=90
    [/resistance]
    # wmllint: notecheck off
    description="" # wmllint: ignore
    die_sound={SOUND_LIST:BIOMECHANICAL_DIE}
    {DEFENSE_ANIM "units/shaxthal/deathbringer-alpha.png" "units/shaxthal/deathbringer-alpha.png" {SOUND_LIST:BIOMECHANICAL_HIT} }
    [abilities]
        {ABILITY_ASPECT_DESTROYER}
        {ABILITY_TERROR}
        {ABILITY_LEADERSHIP}
    [/abilities]

    [attack]
        name=soul spear
        description= _ "soul spear"
        type=arcane
        range=melee
        damage=24
        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=13
        number=6
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]

    {SOUL_SPEAR_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]
#endif

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


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Shaxthal Stormblade Ivyel
    [base_unit]
        id=Shaxthal Stormblade
    [/base_unit]
    image="units/shaxthal/ivyel.png"
    hitpoints=73
    movement=6
    cost=66
    hide_help=true
    [resistance]
        arcane=110
    [/resistance]
    {DEFENSE_ANIM "units/shaxthal/ivyel.png" "units/shaxthal/ivyel.png" {SOUND_LIST:BIOMECHANICAL_HIT} }
    [attack]
        name=rayblade
        description= _ "weapon^rayblade"
    [/attack]
    [attack]
        name=energy shock
        description= _ "energy shock"
        damage,number=11,3
    [/attack]
    [attack_anim]
        [filter_attack]
            name=rayblade
        [/filter_attack]
        [frame]
            image="units/shaxthal/ivyel.png"
        [/frame]
        [if]
            [frame]
                image="units/shaxthal/ivyel.png"
            [/frame]
        [/if]
        [else]
            [frame]
                image="units/shaxthal/ivyel.png"
            [/frame]
        [/else]
        [frame]
            image="units/shaxthal/ivyel.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=energy shock
        [/filter_attack]
        [frame]
            image="units/shaxthal/ivyel.png"
        [/frame]
        [frame]
            image="units/shaxthal/ivyel.png"
        [/frame]
    [/attack_anim]
[/unit_type]

# 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=Shaxthal Turret
    name= _ "Turret"
    race=shaxthal
    ignore_race_traits=yes
    {TRAIT_BIOMECHANICAL}
    # the unit box in sidebar and help screen is really limited to 72x72...
    image="units/shaxthal/turret.png~SCALE(72,72)"
    hitpoints=97
    movement_type=none
    [resistance]
        blade=60
        pierce=70
        impact=90
        fire=110
        cold=90
        arcane=120
    [/resistance]
    movement=1
    {NO_EXPERIENCE_UNIT}
    level=2
    alignment=neutral
    cost=24
    usage=archer
    undead_variation=null
    description= _ "It is said that these technological constructs once were living creatures, and in particular, some of the most persistent opponents faced by Uria’s forces on Irdya and Inferno. Whether their former selves remain within their twisted bodies is a mystery, but if it were indeed the case they would unhesitatingly embrace their own destruction."
    die_sound=lich-die.ogg

    [attack]
        name=energy burst
        description= _ "energy burst"
        icon=attacks/energy-shock.png
        type=impact
        range=melee
        damage=13
        number=2
    [/attack]
    [attack]
        name=energy burst
        description= _ "energy burst"
        icon=attacks/energy-shock.png
        type=impact
        range=ranged
        damage=13
        number=2
    [/attack]

    [standing_anim]
        start_time=0
        auto_hflip=no
        [frame]
            duration=100
            image="units/shaxthal/turret.png"
        [/frame]
    [/standing_anim]

    [death]
        start_time=0
        auto_hflip=no

        explosion_start_time=599
        explosion_auto_hflip=no
        explosion_auto_vflip=no

        [frame]
            duration=600
            image="units/shaxthal/turret.png"
            blend_color=255,0,0
            blend_ratio=0.0~1.0
        [/frame]
        [frame]
            duration=200
            image="units/shaxthal/turret.png"
            alpha=1.0~0.0
            blend_color=255,0,0
            blend_ratio=1.0
        [/frame]
        [frame]
            duration=1
            image="misc/blank-hex.png"
            alpha=0.0
        [/frame]

        [explosion_frame]
            duration=1
            image="misc/blank-hex.png"
        [/explosion_frame]
        [explosion_frame]
            duration=100
            image="projectiles/fireball-impact-7.png"
            sound={SOUND_LIST:EXPLOSION}
        [/explosion_frame]
        [explosion_frame]
            duration=100
            image="projectiles/fireball-impact-8.png"
        [/explosion_frame]
        [explosion_frame]
            duration=100
            image="projectiles/fireball-impact-9.png"
        [/explosion_frame]
        [explosion_frame]
            duration=100
            image="projectiles/fireball-impact-10.png"
        [/explosion_frame]
        [explosion_frame]
            duration=100
            image="projectiles/fireball-impact-11.png"
        [/explosion_frame]
        [explosion_frame]
            duration=100
            image="projectiles/fireball-impact-12.png"
        [/explosion_frame]
        [explosion_frame]
            duration=100
            image="projectiles/fireball-impact-13.png"
        [/explosion_frame]
        [explosion_frame]
            duration=100
            image="projectiles/fireball-impact-14.png"
        [/explosion_frame]
        [explosion_frame]
            duration=100
            image="projectiles/fireball-impact-15.png"
        [/explosion_frame]
        [explosion_frame]
            duration=100
            image="projectiles/fireball-impact-16.png"
        [/explosion_frame]
        [explosion_frame]
            duration=1
            image="misc/blank-hex.png"
            alpha=0.0
        [/explosion_frame]
    [/death]

    [defend]
        start_time=-125
        sound_start_time=-26
        auto_hflip=no

        [frame]
            duration=250
            image="units/shaxthal/turret.png"
        [/frame]

        [sound_frame]
            duration=1
        [/sound_frame]

        [if]
            hits=hit
            [sound_frame]
                duration=150
                sound={SOUND_LIST:LICH_HIT}
            [/sound_frame]
        [/if]
        [else]
            hits=miss,kill
            [sound_frame]
                duration=150
            [/sound_frame]
        [/else]
    [/defend]

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

        start_time=-300
        auto_hflip=no

        {MISSILE_FRAME_ENERGY_SHOCK}

        [frame]
            duration=100
            image="units/shaxthal/turret.png"
            sound=shaxthal-energy-prelude.ogg
        [/frame]
        [frame]
            duration=300
            image="units/shaxthal/turret.png"
            sound=shaxthal-energy-fire.ogg
        [/frame]
    [/attack_anim]
[/unit_type]
#endif

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


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Shaxthal Warlord Elyssa
    name= _ "female^Shaxthal Warlord"
    race=shaxthal
    gender=female
    image="units/shaxthal/warlord-elyssa.png"
    profile="portraits/elyssa.png"
    hitpoints=145
    movement_type=biomechanical_elusivefoot
    movement=6
    experience=250
    level=5
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=280
    usage=mixed fighter
    undead_variation=null
    [resistance]
        blade=80
        impact=70
        arcane=100
        fire=70
    [/resistance]
    [abilities]
        {ABILITY_SUBMERGE}
        {ABILITY_REGENERATES}
        {ABILITY_LEADERSHIP}
    [/abilities]
    # Exclude from units.w.o, not from the help browser.
    do_not_list=yes
    description= _ "Nobody knows for sure what path led her to become what she is now: a creature neither human nor machine. The Chaos Warlord’s human visage and emaciated body belie the fearsome strength and sharpness of mind she has displayed in battle over the centuries. To Uria’s servants — humans or otherwise — her unnatural abilities and great power have earned her a reputation as a demoness, along with the fear and respect normally reserved for a demon lord.

The fate of anyone facing her in combat is already set, and the most they can hope for is a swift and painless death."
    die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}
    {DEFENSE_ANIM "units/shaxthal/warlord-elyssa.png" "units/shaxthal/warlord-elyssa.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
    [attack]
        name=sword
        description={TSTR_ATTACK_NAME_SWORD}
        type=blade
        range=melee
        damage=11
        number=4
        icon=attacks/scimitar.png
        [specials]
            {WEAPON_SPECIAL_DRAIN}
        [/specials]
    [/attack]
    [attack]
        name=ethereal blast
        description= _ "ethereal blast"
        type=arcane
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=9
        number=5
        icon=attacks/missile-chaos.png
    [/attack]
    [attack]
        name=burning inferno
        description= _ "burning inferno"
        type=fire
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=14
        number=3
        icon=attacks/fireball.png
    [/attack]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        [frame]
            begin=-225
            end=-175
            image="units/shaxthal/warlord-elyssa.png"
        [/frame]
        [frame]
            begin=-175
            end=-100
            image="units/shaxthal/warlord-elyssa.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/shaxthal/warlord-elyssa.png"
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/shaxthal/warlord-elyssa.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=175
            image="units/shaxthal/warlord-elyssa.png"
        [/frame]
        [frame]
            begin=175
            end=200
            image="units/shaxthal/warlord-elyssa.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=ethereal blast
        [/filter_attack]
        [missile_frame]
            begin=-200
            end=50
            image="projectiles/chaosmissile-n.png"
            image_diagonal="projectiles/chaosmissile-ne.png"
            halo=halo/chaos-halo1.png:25,halo/chaos-halo2.png:25,halo/chaos-halo3.png:25,halo/chaos-halo4.png:25,halo/chaos-halo5.png:25,halo/chaos-halo6.png:25,halo/chaos-halo7.png:25,halo/chaos-halo8.png:25,halo/chaos-halo9.png:50
            halo_x,halo_y=10,-2
        [/missile_frame]
        [frame]
            begin=-300
            end=-200
            image="units/shaxthal/warlord-elyssa.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-200
                end=100
                image="units/shaxthal/warlord-elyssa.png"
                sound=magic-missile-1.ogg,magic-missile-2.ogg,magic-missile-3.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-200
                end=100
                image="units/shaxthal/warlord-elyssa.png"
                sound=magic-missile-1-miss.ogg,magic-missile-2-miss.ogg,magic-missile-3-miss.ogg
            [/frame]
        [/else]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=burning inferno
        [/filter_attack]

        start_time=-400

        {FLAME_BLAST_ANIMATION}

        [frame]
            duration=100
            image="units/shaxthal/warlord-elyssa.png"
        [/frame]
        [frame]
            duration=100
            image="units/shaxthal/warlord-elyssa.png"
        [/frame]
        [frame]
            duration=200
            image="units/shaxthal/warlord-elyssa.png"
        [/frame]
        [frame]
            duration=100
            image="units/shaxthal/warlord-elyssa.png"
        [/frame]
        [frame]
            duration=100
            image="units/shaxthal/warlord-elyssa.png"
        [/frame]
    [/attack_anim]

    [variation]
        variation_id=e2s12_cutscene
        inherit=yes
        hide_help=yes
        image="units/shaxthal/warlord-elyssa-cutscene-1.png"

        # Defense animation required for E19.1
        {DEFENSE_ANIM "units/shaxthal/warlord-elyssa-cutscene-1.png" "units/shaxthal/warlord-elyssa-cutscene-1.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }

        [levelout_anim]
            blend_ratio="0.0~1.0"
            blend_color="255,0,0"
            start_time=0
            [frame]
                duration=1500
            [/frame]
        [/levelout_anim]
    [/variation]

    [variation]
        variation_id=e3s0_cutscene_1
        inherit=yes
        hide_help=yes
        image="units/shaxthal/warlord-elyssa-cutscene-2.png"

        [levelin_anim]
            blend_ratio="1.0~0.0"
            blend_color="255,0,0"
            start_time=0
            [frame]
                duration=800
            [/frame]
        [/levelin_anim]
    [/variation]

    [variation]
        variation_id=e3s0_cutscene_2
        inherit=yes
        hide_help=yes
        #image="units/shaxthal/warlord-elyssa-cutscene-3-se.png"
        [standing_anim]
            direction=s,se,sw
            [frame]
                image="units/shaxthal/warlord-elyssa-cutscene-3-se.png"
            [/frame]
        [/standing_anim]
        [standing_anim]
            direction=n,ne,nw
            [frame]
                image="units/shaxthal/warlord-elyssa-cutscene-3-ne.png"
            [/frame]
        [/standing_anim]
    [/variation]
[/unit_type]

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


#textdomain wesnoth-After_the_Storm

#ifdef CAMPAIGN_AFTER_THE_STORM_EPISODE_III

#
# This unit is intended to be identical to the regular Elyssa used in
# E1 and E2 except for the graphics--which will eventually be subtly
# different--and some stats, the unit type description, and
# --eventually-- portraits.
#
# The transition intended is that Elynia knows she's dealing with
# Merthiaal's heir, hence she's identified as the Guardian of Darkness.
# What she doesn't know yet is the full extent of her powers. The
# transition begins with this unit type and ends with the real
# Guardian of Darkness unit type.
#

[unit_type]
    id=Boss Shaxthal Warlord Elyssa
    [base_unit]
        id=Shaxthal Warlord Elyssa
    [/base_unit]
    name= _ "female^Guardian of Darkness"
    image="units/shaxthal/warlord-elyssa-f+sword.png"
    # TODO: portraits!
    #profile="portraits/elyssa.png"
    hide_help=true
    description= _ "There is no information available about this class of beings at this time."

    {DEFENSE_ANIM "units/shaxthal/warlord-elyssa-f+sword.png" "units/shaxthal/warlord-elyssa-f+sword.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }

    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        [frame]
            image="units/shaxthal/warlord-elyssa-f+sword.png"
        [/frame]
        [frame]
            image="units/shaxthal/warlord-elyssa-f+sword.png"
        [/frame]
        [if]
            [frame]
                image="units/shaxthal/warlord-elyssa-f+sword.png"
            [/frame]
        [/if]
        [else]
            [frame]
                image="units/shaxthal/warlord-elyssa-f+sword.png"
            [/frame]
        [/else]
        [frame]
            image="units/shaxthal/warlord-elyssa-f+sword.png"
        [/frame]
        [frame]
            image="units/shaxthal/warlord-elyssa-f+sword.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=ethereal blast
        [/filter_attack]
        [frame]
            image="units/shaxthal/warlord-elyssa-f+sword.png"
        [/frame]
        [if]
            [frame]
                image="units/shaxthal/warlord-elyssa-f+sword.png"
            [/frame]
        [/if]
        [else]
            [frame]
                image="units/shaxthal/warlord-elyssa-f+sword.png"
            [/frame]
        [/else]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=burning inferno
        [/filter_attack]
        [frame]
            image="units/shaxthal/warlord-elyssa-f+sword.png"
        [/frame]
        [frame]
            image="units/shaxthal/warlord-elyssa-f+sword.png"
        [/frame]
        [frame]
            image="units/shaxthal/warlord-elyssa-f+sword.png"
        [/frame]
        [frame]
            image="units/shaxthal/warlord-elyssa-f+sword.png"
        [/frame]
        [frame]
            image="units/shaxthal/warlord-elyssa-f+sword.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=Guardian of Darkness Elyssa
    name= _ "female^Guardian of Darkness"
    race=shaxthal
    gender=female
    image="units/shaxthal/warlord-elyssa-f.png"
    profile="portraits/elyssa.png"
    hitpoints=145
    movement_type=biomechanical_elusivefoot
    movement=6
    experience=181
    level=6
    alignment=neutral
    advances_to=null
    {AMLA_TREE:ELYSSA_GUARDIAN}
    {AMLA_VITALITY}
    cost=910
    usage=mixed fighter
    hide_help=true
    undead_variation=null
    [resistance]
        blade=80
        impact=70
        arcane=100
        fire=70
    [/resistance]
    [abilities]
        {ABILITY_ASPECT_OF_DARKNESS}
        {ABILITY_SUBMERGE}
    [/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 128 -64 -64 "units/shaxthal/warlord-elyssa-f.png" "units/shaxthal/warlord-elyssa-f.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }

    [attack]
        name=claw of urvatha
        description= _ "claw of urvatha"
        type=arcane
        range=melee
        damage=18
        number=2
        icon=attacks/staff-elven-star.png # FIXME: placeholder
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]
    [attack]
        name=noctum
        description= _ "noctum"
        type=arcane
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=16
        number=5
        icon=attacks/noctum.png
    [/attack]
    [attack]
        name=pyranoctum
        description= _ "pyranoctum" # wmllint: no spellcheck
        type=fire
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=24
        number=3
        icon=attacks/fireball.png
    [/attack]

    #
    # NOTE: There's a copy of this animation in the Dream Controller unit. It
    #       must be kept in sync with this one.
    #

    [attack_anim]
        [filter_attack]
            name=claw of urvatha
        [/filter_attack]
        [frame]
            begin=-250
            end=-125
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-125
                end=-100
                sound=magic-dark.ogg
            [/frame]
            [frame]
                begin=-100
                end=100
                sound=spear.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-125
                end=-100
            [/frame]
            [frame]
                begin=-100
                end=100
                sound=spear-miss.ogg
            [/frame]
        [/else]
        [frame]
            begin=100
            end=175
        [/frame]
    [/attack_anim]

#ifdef 0

#define ELYSSA_NOCTUM_ANIMATION _BOLT_N1 _BOLT_N2
    [attack_anim]
        [filter_attack]
            name=noctum
        [/filter_attack]
        start_time=-400

        {NOCTUM_BEAM_ANIMATION}

        {NOCTUM_BOLT_ANIMATION {_BOLT_N1} {_BOLT_N2} }

        [frame]
            duration=600
        [/frame]
    [/attack_anim]
#enddef

    {ELYSSA_NOCTUM_ANIMATION 1 2}
    {ELYSSA_NOCTUM_ANIMATION 2 1}
    {ELYSSA_NOCTUM_ANIMATION 2 3}
    {ELYSSA_NOCTUM_ANIMATION 3 2}
    {ELYSSA_NOCTUM_ANIMATION 1 3}
    {ELYSSA_NOCTUM_ANIMATION 3 1}

#undef ELYSSA_NOCTUM_ANIMATION

#else
    [attack_anim]
        [filter_attack]
            name=noctum
        [/filter_attack]
        start_time=-400

        {NOCTUM_BEAM_ANIMATION}

        [frame]
            duration=200
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=125
                sound=magic-dark-big.ogg
            [/frame]
            [frame]
                duration=75
                sound={SOUND_LIST:HOLY}
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=125
                sound=magic-dark-big-miss.ogg
            [/frame]
            [frame]
                duration=75
                sound={SOUND_LIST:HOLY_MISS}
            [/frame]
        [/else]
    [/attack_anim]

#endif

    [attack_anim]
        [filter_attack]
            name=pyranoctum
        [/filter_attack]
        start_time=-400

        {NOCTUM_BEAM_ANIMATION}

        {NOCTUM_FIRE_ANIMATION}

        [frame]
            duration=600
        [/frame]
    [/attack_anim]

    #
    # The following attack animation is only used by the sword-wielding
    # variation. Since the only way to avoid its code getting merged with the
    # first attack animation of the base variation (hilarity ensues) is
    # to know the exact amount and order of attack_anim tags to skip from
    # merge (probably by specifying them as empty in the child variation)
    # and the code is still in flux as of this writing, let's keep the
    # sword animation code in the base variation instead.
    #

    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        [frame]
            begin=-225
            end=-175
        [/frame]
        [frame]
            begin=-175
            end=-100
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=175
        [/frame]
        [frame]
            begin=175
            end=200
        [/frame]
    [/attack_anim]

    [extra_anim]
        flag=defense_half
        start_time=0
        [frame]
            duration=200
            image="units/shaxthal/warlord-elyssa-f.png"
            halo="halo/guardian-defense-halo.png"
            halo_mod="~CS(128,-64,-64)"
        [/frame]
        [frame]
            duration=100
            image="units/shaxthal/warlord-elyssa-f.png"
            halo="halo/guardian-defense-halo.png"
            halo_mod="~CS(128,-64,-64)~O(0.8)"
        [/frame]
        [frame]
            duration=50
            image="units/shaxthal/warlord-elyssa-f.png"
            halo="halo/guardian-defense-halo.png"
            halo_mod="~CS(128,-64,-64)~O(0.6)"
        [/frame]
        [frame]
            duration=50
            image="units/shaxthal/warlord-elyssa-f.png"
            halo="halo/guardian-defense-halo.png"
            halo_mod="~CS(128,-64,-64)~O(0.4)"
        [/frame]
        [frame]
            duration=50
            image="units/shaxthal/warlord-elyssa-f.png"
            halo="halo/guardian-defense-halo.png"
            halo_mod="~CS(128,-64,-64)~O(0.2)"
        [/frame]
    [/extra_anim]

    [variation]
        variation_id=sword
        inherit=yes
        image="units/shaxthal/warlord-elyssa-f+sword.png"

        {GUARDIAN_DEFENSE_ANIM 128 -64 -64 "units/shaxthal/warlord-elyssa-f+sword.png" "units/shaxthal/warlord-elyssa-f+sword.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }

        [attack]
            name=sword
            description={TSTR_ATTACK_NAME_SWORD}
            type=blade
            range=melee
            damage=14
            number=4
            icon=attacks/scimitar.png
            [specials]
                #
                # "Remove" the magical weapon special introduced
                # by [variation] inheritance.
                #
                [chance_to_hit]
                    id=magical
                    name="" # wmllint: ignore
                    description="" # wmllint: ignore
                    [filter_adjacent]
                        adjacent=n,ne,se,s,sw,nw
                        type=Yeti
                    [/filter_adjacent]
                [/chance_to_hit]
                {WEAPON_SPECIAL_DRAIN}
            [/specials]
        [/attack]
    [/variation]

#define ELYSSA_ILLUSION_CUTSCENE_VARIATION _N
    [variation]
        variation_id="illusion"+{_N}
        inherit=yes
        image="units/shaxthal/warlord-elyssa-f-illusion-"+{_N}+".png"
        #
        # All images are just variations on the first frame, so have only that one
        # represent the set in the game sidebar.
        #
        image_icon="units/shaxthal/warlord-elyssa-f-illusion-1.png"
        profile="unit_image"
    [/variation]
#enddef

    {ELYSSA_ILLUSION_CUTSCENE_VARIATION 1}
    {ELYSSA_ILLUSION_CUTSCENE_VARIATION 2}
    {ELYSSA_ILLUSION_CUTSCENE_VARIATION 3}
    {ELYSSA_ILLUSION_CUTSCENE_VARIATION 4}
    {ELYSSA_ILLUSION_CUTSCENE_VARIATION 5}
    {ELYSSA_ILLUSION_CUTSCENE_VARIATION 6}

#undef ELYSSA_ILLUSION_CUTSCENE_VARIATION

    [variation]
        variation_id=injured
        inherit=yes
        image="units/shaxthal/warlord-elyssa-f-injured.png"
        # hide ellipse
        ellipse=none # wmllint: no ellipsecheck
    [/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

#
# This unit is used at the end of E3S7A.2 for Elyssa to fight ELynia with her
# Guardian of Darkness unit type without revealing crucial spoilers to players
# in the form of her AMLA selection.
#
# See <https://github.com/project-ethea/After_the_Storm/issues/72> for more
# information on why this clunky approach is necessary as opposed to just using
# [object] in the scenario proper.
#

[unit_type]
    id=Boss Guardian of Darkness Elyssa
    [base_unit]
        id=Guardian of Darkness Elyssa
    [/base_unit]

    # wmlunits doesn't seem to read hide_help values through [base_unit]. This
    # tool is truly the biggest enemy of story-based campaign authors.
    hide_help=true

    # This will force all [advancements] to be removed from the WML tree so we
    # can add the default AMLA next.
    {AMLA_TREE:ELYSSA_GUARDIAN:DELETE}

    {AMLA_DEFAULT}

    # Reset her XP to something that makes sense for a level 6 unit.
    experience=300
[/unit_type]

#endif


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Shaxthal Warlord Narhamoth
    name= _ "Shaxthal Warlord"
    image="units/shaxthal/warlord-narhamoth.png"
    profile="portraits/dark-knight.png"
    race=shaxthal
    hitpoints=99
    movement_type=biomechanical_smallfoot
    movement=5
    experience=250
    level=5
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=140
    usage=fighter
    hide_help=true
    undead_variation=null
    [resistance]
        blade=70
        impact=70
        arcane=100
        fire=100
        cold=80
    [/resistance]
    [abilities]
        {ABILITY_SUBMERGE}
        {ABILITY_STEADFAST}
        {ABILITY_LEADERSHIP}
    [/abilities]
    description= _ "In stark contrast with their remarkably savage soldiers and mercenaries, the Chaos Empire’s higher tiers are well defined and disciplined. Commanding the uncivilized human and demonic hordes is no easy task, and the Chaos Lorekeepers use their dominance of magic to intimidate their violent subordinates and keep them under control."
    die_sound={SOUND_LIST:DWARF_DIE}
    {DEFENSE_ANIM "units/shaxthal/warlord-narhamoth.png" "units/shaxthal/warlord-narhamoth.png" {SOUND_LIST:DWARF_HIT} }
    [attack]
        name=sword
        description={TSTR_ATTACK_NAME_SWORD}
        type=blade
        range=melee
        [specials]
            {WEAPON_SPECIAL_SHOCK}
        [/specials]
        damage=15
        number=3
        icon=attacks/greatsword-orcish.png
    [/attack]
    [attack]
        name=ethereal blast
        description= _ "ethereal blast"
        type=arcane
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
            {WEAPON_SPECIAL_DRAIN}
        [/specials]
        damage=10
        number=3
        icon=attacks/missile-chaos.png
    [/attack]
    [attack_anim]
        [filter_attack]
            name=ethereal blast
        [/filter_attack]
        [missile_frame]
            begin=-200
            end=50
            image="projectiles/chaosmissile-n.png"
            image_diagonal="projectiles/chaosmissile-ne.png"
            halo=halo/chaos-halo1.png:25,halo/chaos-halo2.png:25,halo/chaos-halo3.png:25,halo/chaos-halo4.png:25,halo/chaos-halo5.png:25,halo/chaos-halo6.png:25,halo/chaos-halo7.png:25,halo/chaos-halo8.png:25,halo/chaos-halo9.png:50
            halo_x,halo_y=10,-2
        [/missile_frame]
        [frame]
            begin=-300
            end=-200
            image="units/shaxthal/warlord-narhamoth.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                begin=-200
                end=100
                image="units/shaxthal/warlord-narhamoth.png"
                sound=magic-missile-1.ogg,magic-missile-2.ogg,magic-missile-3.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-200
                end=100
                image="units/shaxthal/warlord-narhamoth.png"
                sound=magic-missile-1-miss.ogg,magic-missile-2-miss.ogg,magic-missile-3-miss.ogg
            [/frame]
        [/else]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=sword
        [/filter_attack]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=0
                image="units/shaxthal/warlord-narhamoth.png"
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=0
                image="units/shaxthal/warlord-narhamoth.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=0
            end=200
            image="units/shaxthal/warlord-narhamoth.png"
        [/frame]
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Chaos Cardinal Fused
    name= _ "Chaos Cardinal"
    race=undead
    image="units/undead-necromancers/chaos-cardinal-fused.png"
    # No halo of its own, it's handled by an [item] that persists after death
    hitpoints=109
    movement_type=undeadfoot
    movement=6
    experience=250
    level=5
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=280
    usage=mixed fighter
    hide_help=true
    description= _ "Infused with Yechnagoth’s dark power and bound to the structure housing a replica of her preserved heart, this necromancer knows no limits to his worship of the deities who mandated the construction of the Chaos Empire. Thus he has offered his own soul as a tribute for the Eater of Souls, intent on fulfilling her covenant with Uria by utilizing his own decayed body as a medium.

Even while restricted to watching his minions strike down all undesirable intrusion during his unholy ritual, and even as the corrupting energy of the fallen goddess slowly gnaws at his very soul, he can channel it into a devastating blast capable of ravaging the souls of his helpless targets."
    die_sound=lich-die.ogg
    {DEFENSE_ANIM "units/undead-necromancers/chaos-cardinal-fused.png" "units/undead-necromancers/chaos-cardinal-fused.png" {SOUND_LIST:LICH_HIT} }
    [movement_costs]
        shallow_water={UNREACHABLE}
        reef={UNREACHABLE}
        swamp_water={UNREACHABLE}
        flat={UNREACHABLE}
        sand={UNREACHABLE}
        forest={UNREACHABLE}
        hills={UNREACHABLE}
        mountains={UNREACHABLE}
        village={UNREACHABLE}
        castle={UNREACHABLE}
        cave={UNREACHABLE}
        frozen={UNREACHABLE}
        fungus={UNREACHABLE}
    [/movement_costs]
    [abilities]
        {ABILITY_ZEAL}
        {ABILITY_REGENERATES}
    [/abilities]
    [attack]
        name=noctum
        description= _ "noctum"
        icon=attacks/noctum.png
        type=arcane
        range=melee
        damage=128
        number=1
        [specials]
            {WEAPON_SPECIAL_ALWAYS_HITS}
        [/specials]
    [/attack]
    [attack]
        name=chill tempest
        description=_"chill tempest"
        type=cold
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        range=ranged
        damage=27
        number=5
        icon=attacks/iceball.png
    [/attack]
    [attack]
        name=breath of nyx
        description=_"breath of nyx"
        type=arcane
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        range=ranged
        damage=11
        number=5
        icon=attacks/dark-missile.png
    [/attack]

    [standing_anim]
        start_time=0
        auto_hflip=no

        [if]
            direction=n,s,se,ne
            [frame]
                image="units/undead-necromancers/chaos-cardinal-fused.png:2500"
            [/frame]
        [/if]
        [else]
            direction=nw,sw
            [frame]
                image="units/undead-necromancers/chaos-cardinal-fused-fl.png:2500"
            [/frame]
        [/else]
    [/standing_anim]

    #
    # Make opening and closing tags in next macro invisible to wmlxgettext so
    # it doesn't crap out with "expected closed node 'unit_type' got
    # '{_ANIM_TYPE}'" on the closing tag.
    #
#define __WMLXGETTEXT_TAG _TAG
    {_TAG}
#enddef

# wmlindent: start ignoring
#define HEKUBA_CCF_BASIC_ANIM _ANIM_TYPE _DIRECTION _BASEFRAME
    {__WMLXGETTEXT_TAG [{_ANIM_TYPE}]}
        auto_hflip=no
        direction={_DIRECTION}
        [frame]
            image={_BASEFRAME}
        [/frame]
    {__WMLXGETTEXT_TAG [/{_ANIM_TYPE}]}
#enddef
# wmlindent: stop ignoring

#define HEKUBA_CCF_DEFENSE_ANIM _DIRECTION _BASEFRAME
    [defend]
        start_time=-125
        sound_start_time=-26
        direction={_DIRECTION}
        auto_hflip=no

        [frame]
            duration=250
            image={_BASEFRAME}
        [/frame]

        [sound_frame]
            duration=1
        [/sound_frame]

        [if]
            hits=hit
            [sound_frame]
                duration=150
                sound={SOUND_LIST:LICH_HIT}
            [/sound_frame]
        [/if]
        [else]
            hits=miss,kill
            [sound_frame]
                duration=150
            [/sound_frame]
        [/else]
    [/defend]
#enddef

    #
    # FIXME: break this down further when we get individual animation frames
    #

#define HEKUBA_CCF_ATTACK_ANIM3_BASE _ATTACK_NAME _DURATION _BASEFRAME _BASEFRAME_REVERSE _ANIMATION
    [attack_anim]
        [filter_attack]
            name={_ATTACK_NAME}
        [/filter_attack]

        auto_hflip=no

        [if]
            direction=se,s,ne,n
            [frame]
                duration={_DURATION}
                image={_BASEFRAME}
            [/frame]
        [/if]
        [else]
            direction=sw,nw
            [frame]
                duration={_DURATION}
                image={_BASEFRAME_REVERSE}
            [/frame]
        [/else]

        {_ANIMATION}
    [/attack_anim]
#enddef

#define HEKUBA_CCF_ATTACK_ANIM3 _ATTACK_NAME _DURATION _BASEFRAME _BASEFRAME_REVERSE _ANIMATION
    {HEKUBA_CCF_ATTACK_ANIM3_BASE ({_ATTACK_NAME}) ({_DURATION}) ({_BASEFRAME}) ({_BASEFRAME_REVERSE}) ({_ANIMATION})}
#enddef

    {HEKUBA_CCF_BASIC_ANIM death se,s,ne,n "units/undead-necromancers/chaos-cardinal-fused.png"}
    {HEKUBA_CCF_BASIC_ANIM death sw,nw     "units/undead-necromancers/chaos-cardinal-fused-fl.png"}

    {HEKUBA_CCF_DEFENSE_ANIM     se,s,ne,n "units/undead-necromancers/chaos-cardinal-fused.png"}
    {HEKUBA_CCF_DEFENSE_ANIM     sw,nw     "units/undead-necromancers/chaos-cardinal-fused-fl.png"}

    # wmlindent: start ignoring

    {HEKUBA_CCF_ATTACK_ANIM3
        "chill tempest" 600
        "units/undead-necromancers/chaos-cardinal-fused.png"
        "units/undead-necromancers/chaos-cardinal-fused-fl.png"
    (
        start_time=-355
        offset=0

        {MISSILE_FRAME_CHILL_TEMPEST 0 -15}

        halo_start_time=-205
        [halo_frame]
            halo=halo/undead/black-magic-[1~5].png:[75*4,50]
        [/halo_frame]

        {SOUND:HIT_AND_MISS magic-dark-big.ogg magic-dark-big-miss.ogg -150}
    )}

    {HEKUBA_CCF_ATTACK_ANIM3
        "breath of nyx" 800
        "units/undead-necromancers/chaos-cardinal-fused.png"
        "units/undead-necromancers/chaos-cardinal-fused-fl.png"
    (
        start_time=-675
        offset=0

        {MISSILE_FRAME_SHADOW_WAVE}

        halo_start_time=-525
        [halo_frame]
            halo=halo/undead/black-magic-[1~5].png:[75*4,50]
        [/halo_frame]

        {SOUND:HIT_AND_MISS magic-dark-big.ogg magic-dark-big-miss.ogg -50}
    )}

    {HEKUBA_CCF_ATTACK_ANIM3
        "noctum" 500
        "units/undead-necromancers/chaos-cardinal-fused.png"
        "units/undead-necromancers/chaos-cardinal-fused-fl.png"
    (
        start_time=-400
        offset=0.0

        {NOCTUM_BEAM_ANIMATION}

        {SOUND:HIT_AND_MISS {SOUND_LIST:HOLY} {SOUND_LIST:HOLY_MISS} -75}
    )}

    # wmlindent: stop ignoring
[/unit_type]

#undef HEKUBA_CCF_BASIC_ANIM
#undef HEKUBA_CCF_ATTACK_ANIM3
#undef HEKUBA_CCF_DEFENSE_ANIM
#undef HEKUBA_CCF_ATTACK_ANIM3_BASE
#undef __WMLXGETTEXT_TAG

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


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Fallen Faerie
    name= _ "female^Fallen Faerie"
    race=undead
    gender=female
    image="units/faeries/fallen.png"
    [standing_anim]
        start_time=0
        alpha=0.9~0.7:1400,0.7~0.8:600,0.8~0.7:600,0.7~0.9:1400
        [frame]
            image="units/faeries/fallen.png:4000"
        [/frame]
    [/standing_anim]
    hitpoints=43
    movement_type=undeadspirit
    # Resistances and defenses must match the Faerie Spirit unit type.
    # The contrast point is the alignment. It behaves very similar to
    # regular Spectres otherwise.
    [defense]
        forest=40
    [/defense]
    [resistance]
        fire=80
        cold=100
    [/resistance]
    movement=7
    level=3
    alignment=chaotic
    experience=150
    advances_to=null
    {AMLA_DEFAULT}
    cost=63
    usage=scout
    [abilities]
        {ABILITY_SYLVAN_SPARK}
    [/abilities]
    description= _ "The essence of true faeries normally makes it unfeasible for them to be brought back as undead, but this is by no means a feat without precedent.

Much like other creatures resurrected by necromancy they are merely shadows of their former beings, mostly devoid of free will and emotions. They roam about places from their previous memories, seeking to draw energy from the living in a futile attempt to revert the effects of time upon their decayed bodies and spirits. Their former affinity to forests becomes key to their subsistence, but there is little more they can obtain from it."
    die_sound=lich-die.ogg
    {DEFENSE_ANIM "units/faeries/fallen.png" "units/faeries/fallen.png" {SOUND_LIST:LICH_HIT} }
    [attack]
        name=death touch
        description= _ "death touch"
        icon=attacks/touch-undead.png
        type=arcane
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        range=melee
        damage=10
        number=2
    [/attack]
    [attack]
        name=wail
        description={TSTR_ATTACK_NAME_WAIL}
        type=cold
        range=ranged
        damage=10
        number=3
    [/attack]
    [attack_anim]
        [filter_attack]
            name=death touch
        [/filter_attack]

        start_time=-500
        offset=0.0~1.0:425,0.0:225
        alpha=0.8~0.0:425,0.0~0.8:225

        [frame]
            duration=25
            image="units/faeries/fallen.png"
        [/frame]
        [frame]
            duration=175
            image="units/faeries/fallen.png"
        [/frame]
        [frame]
            duration=175
            image="units/faeries/fallen.png"
        [/frame]
        [frame]
            duration=100
            image="units/faeries/fallen.png"
            sound=wail-sml.wav
        [/frame]
        [frame]
            duration=75
            image="units/faeries/fallen.png"
        [/frame]
        [frame]
            duration=75
            image="units/faeries/fallen.png"
        [/frame]
        [frame]
            duration=25
            image="units/faeries/fallen.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=wail
        [/filter_attack]
        {MISSILE_FRAME_WAIL}
        [frame]
            begin=-250
            end=-200
            image="units/faeries/fallen.png"
        [/frame]
        [frame]
            sound=wail.wav
            begin=-200
            end=50
            image="units/faeries/fallen.png"
        [/frame]
    [/attack_anim]
[/unit_type]

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


#textdomain wesnoth-Invasion_from_the_Unknown

[about]
    images="maps/background.jpg"
[/about]
[about]
    title= _ "Creator and Lead Designer"
    [entry]
        name="Iris Morelle (Irydacea/shadowm)"
        email="shadowm2006@gmail.com"
        wikiuser="shadowm"
    [/entry]
[/about]
[about]
    title= _ "Campaign Maintenance"
    #
    # Current main maintainer
    #
    [entry]
        name="Iris Morelle (Irydacea/shadowm)"
    [/entry]
[/about]
[about]
    title= _ "Graphics"
    [entry]
        name="Iris Morelle (Irydacea/shadowm)"
        comment="Too much stuff"
    [/entry]
    [entry]
        name="Kathrin Polikeit (Kitty)"
        comment="
Portraits:
- Original portraits since 1.10.0
- Generic elvish portraits that were imported to serve as place-holders for 1.0
- Campaign menu entry's big picture/crop (generic story graphic)
"
    [/entry]
    [entry]
        name = "Marcus Rosén (sleepwalker)"
        comment = "Regular demon portraits"
    [/entry]

    {CREDITS_SEPARATOR}

    [entry]
        name="Art Wu (EVILEST)"
    [/entry]
    [entry]
        name="Ben Wenzel (artisticdude)"
        comment="Improved Demon, Demon Grunt, Demon Zephyr, and Demon Warrior baseframes"
    [/entry]
    [entry]
        name="Blarumyrran"
        comment="
- Dark hive floor tiles
- Deathguard
- Bookshelves
- New fungoid
"
    [/entry]
    [entry]
        name="Charles Dang (vultraz)"
        comment="Elynia staff icon, done with Zerovirus's help"
    [/entry]
    [entry]
        name="doofus-01"
    [/entry]
    [entry]
        name="Emilien Rotival (LordBob)"
        comment="Faerie race icon"
    [/entry]
    [entry]
        name="Erkki Lonkainen (Eternal)"
        comment="
Sprites:
- Base for Elyssa before 1.9.1
- Brain Drainer
- Giant Leech
- Death Baron's palette and helmet deco
- Cockatrice
- Lesser Giant Spider
- Gutwrencher Imp
"
    [/entry]
    [entry]
        name="Francisco Muñoz (fmunoz)"
        comment="
Sprites:
- Some elemental spirits' graphics
- Giant boar
- Water Serpent
- Iron Golem
- Base for L0 Imp, which was Ghoul on Wesnoth 1.0.2
- Verlissh Spearberar unit line
"
    [/entry]
    [entry]
        name = "Lari Nieminen (zookeeper)"
        comment = "Additional work on the Death Baron animations"
    [/entry]
    [entry]
        name="Neoriceisgood"
        comment="
- Most original Chaos faction sprites used until around 0.7.
- Original demon unit line before version 0.0.911
- Dwarvish Steamwheel and Steamcopter unit lines' graphics
- Dwarvish Handcannon
- Automaton stand. frame
- Worker Droid stand. frame
- Armageddon Imp
- Base for L1 Imp (EE: Lesser Abomination)
- Base for L2 Imp (EE: Flesh Hound)
- Alternate loyalist swordsman unit line
- Dark General
- Verlissh-Psy Mindraider
"
    [/entry]
    [entry]
        name="Neoskel"
        comment="Chaos faction revamp; some new loyalist sprites"
    [/entry]
    [entry]
        name="Peter Geinitz (Shadow/Wayfarer)"
        comment="
- Entire Aragwaith faction
- Faeries (except Lady of Light and Sylvan Warden)
- Base for Dwarvish Scout line, Dwarvish Arcanister, Dwarvish Flamethrower
- Touch-ups on Lady of Light
- Base for Elvish Guard/Protector
- New Chaos Invoker animation frames, touched-up baseframe
- Fire Aura attack icon
"
    [/entry]
    [entry]
        name="Richard Kettering (Jetrel)"
        comment="
- The base of many custom sprites, some portraits, some visual FX images
- Old elvish sorceress line sprites used for Anlindë's custom unit
- The new faerie wings procedure
- His help and awesomeness
"
    [/entry]

    {CREDITS_SEPARATOR}

    [entry]
        name="GK3"
        comment="Goliath miniboss/boss sprites"
    [/entry]
    [entry]
        name="Hogne Håskjold (Frame/Freim)"
    [/entry]
    [entry]
        name="Irrevenant"
        comment="Touch-ups on Elynia, guidance, indoors ToD icon"
    [/entry]
    [entry]
        name="Melon"
        comment="
Shadow Spawn: from Swarm Lord, Yōkai faction
Shadow Courier: from Blood Manipulator, Vampires EoM faction
"
    [/entry]
    [entry]
        name="Musketaquid"
    [/entry]
    [entry]
        name="Reiner ‘Tiles’ Prokein"
        comment="Miscellaneous props/tiles"
    [/entry]
    [entry]
        name="Samuel Wilson (megane)"
        comment="
- Chaos faction revamp
- Crystal glyph's base, edited by shadowm
- New Dread Bat
- Smaller Crystal Glyph
"
    [/entry]
    [entry]
        name="Santiago Iborra (Quellion)"
        comment="Wight for WTactics.org/Arcmage.org, used as a placeholder for Mal Hekuba"
    [/entry]
    [entry]
        name="Shield"
        comment="New bunnies with color variations (since 2.0)"
    [/entry]
    [entry]
        name="VYNLT"
        comment="Chaos Cardinal"
    [/entry]
    [entry]
        name="Zerovirus"
        comment="Elynia's last baseframe revision; Elynia staff icon, done with vultraz's help; general awesomeness"
    [/entry]
[/about]
[about]
    title= _ "Aragwaith Faction"
    [entry]
        name="Astrid Halberkamp"
        comment="Rebalancing and animation WML updates for the MP 'The Aragwaithi' and 'Era of Chaos' add-ons, applied on IftU 1.99.0 and later"
    [/entry]
    [entry]
        name="Peter Geinitz (Shadow/Wayfarer)"
        comment="Art, concept"
    [/entry]
[/about]
[about]
    title= _ "Music"
    [entry]
        name="Aleksi Aubry-Carlson (Aleksi)"
        comment="Orc Theme, gameplay06.ogg"
    [/entry]
    [entry]
        name="Jeremy Nicoll (jeremy2)"
        comment="Lonely Snowfall"
    [/entry]
    [entry]
        name="Mattias Westlund (West)"
        comment="Ambuscade"
    [/entry]
    [entry]
        name="Telaron"
        comment="climactic_contemplation.ogg, western_theme2.ogg"
    [/entry]
[/about]
[about]
    title= _ "Translations"
    [entry]
        name="kabachuha"
        comment="Russian"
    [/entry]
    [entry]
        name="newfrenchy83"
        comment="French"
    [/entry]
[/about]
[about]
    title= _ "Additional Thanks to"
    [entry]
        name="8680 (8680)"
    [/entry]
    [entry]
        name="Alexander van Gessel (AI/AI0867)"
        comment="Former maintainer"
    [/entry]
    [entry]
        name="Benoît Timbert (Noyga)"
        comment="Wesnoth 1.3.x Extended Era"
    [/entry]
    [entry]
        name="Charles Dang (vultraz)"
        comment="Prose review and revision for IftU 2.0, moral support, playtesting, Wesnoth 1.14.x technical support"
    [/entry]
    [entry]
        name="Dimitar Ilccov (Mythological)"
        comment="Former release helper; bug fixing and compatibility fixes of this campaign with BfW 1.4 beta/RC series"
    [/entry]
    [entry]
        name="Docrock"
        comment="Very early playtesting"
    [/entry]
    [entry]
        name="Elvish_Pillager"
        comment="1.5.x experimental port playtesting"
    [/entry]
    [entry]
        name="Inky"
        comment="Highly educational playthrough and bug reports"
    [/entry]
    [entry]
        name="Konrad2"
        comment="Playtesting of IftU 2.0"
    [/entry]
    [entry]
        name="Michael (Mica)"
        comment="Former non-maintainer uploader"
    [/entry]
    [entry]
        name="nemaara"
        comment="Playtesting of IftU 2.0, moral support"
    [/entry]
    [entry]
        name="Piotr Cychowski (Cycholka/Mistbinder/Mist)"
        comment="Initial porting from the 1.4 branch to 1.5.x"
    [/entry]
    [entry]
        name="S. E. Brune (SouthernOracle)"
        comment="Original prose revision continuing ESR's work, for 1.14.0."
    [/entry]
    [entry]
        name="Sergey Popov (loonycyborg)"
        comment="Playtesting of the 1.5.x port"
    [/entry]
    [entry]
        name="solsword/pmworther"
    [/entry]
    [entry]
        name="Steven Panek (Espreon)"
        comment="Former maintainer, nitpicker, punctuation pedant"
    [/entry]
    [entry]
        name="Turuk"
    [/entry]
    [entry]
        name="Zoltic"
        comment="critical i18n/l10n bugs reporting and hinting"
    [/entry]

    {CREDITS_SEPARATOR}

    [entry]
        name= _ "You, for playing this campaign"
    [/entry]
[/about]

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


# wmllint: no translatables

#define LOG_IFTU_ERR _MSG
    {ERROR ("[IftU] "+{_MSG})}
#enddef

#define LOG_IFTU_WRN _MSG
    {WARNING ("[IftU] "+{_MSG})}
#enddef

#define LOG_IFTU_WARN _MSG
    {WARNING ("[IftU] "+{_MSG})}
#enddef

#define LOG_IFTU _MSG
    {LOG ("[IftU] "+{_MSG})}
#enddef

#ifdef DEBUG
#define LOG_IFTU_DBG _MSG
    {DEBUG ("[IftU] "+{_MSG})}
#enddef
#else
#define LOG_IFTU_DBG _MSG
    {LOG ({_MSG})}
#enddef
#endif

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


#textdomain wesnoth-Invasion_from_the_Unknown

#
# Naia library
#

#ifhave ~add-ons/Naia/loader.cfg

{~add-ons/Naia/loader.cfg}

#else
#ifhave ./Naia/loader.cfg

#define NAIA_EMBEDDED
Invasion_from_the_Unknown#enddef

{./Naia/loader.cfg}

#endif
#endif

#ifndef NAIA_VERSION
#error Naia or a Naia base library component is missing. Cannot continue loading this add-on.
#endif

#
# Local library
#

# LD provides a simpler, shorter way of including WML files by using only
# relative paths (to the add-on's directory).
#define LD __PATH__
{~add-ons/Invasion_from_the_Unknown/{__PATH__}}#enddef

{LD /mainline-strings.cfg}

#ifndef EDITOR

#ifndef __WMLUNITS__

# DIFF includes WML conditionally depending on the selected difficulty. I
# prefer this to mainline's ON_DIFFICULTY macro, which has an exceedingly
# long name for such an ubiquitous purpose. There is no whitespace (e.g.
# tabs, newlines, blanks) around the inclusions in order to avoid issues
# when the substitution is performed in middle of a string literal.
#ifdef EASY
#define DIFF _ON_EASY _ON_NORMAL _ON_HARD
{_ON_EASY}#enddef
#endif
#ifdef NORMAL
#define DIFF _ON_EASY _ON_NORMAL _ON_HARD
{_ON_NORMAL}#enddef
#endif
#ifdef HARD
#define DIFF _ON_EASY _ON_NORMAL _ON_HARD
{_ON_HARD}#enddef
#endif

#define PERSISTENT_NS_IFTU
"Project_Ethea.Invasion_from_the_Unknown" #enddef

# NOTE: do not change the order in which these files are preprocessing unless
# you are very sure of what you are doing.

[lua]
    code = <<
        PROJECT_ETHEA_RECONSTRUCTION_VERSION = '>>+"{LD dist/VERSION}"+<<'

        naia_register_package {
            global_id       = 'project_ethea.Invasion_from_the_Unknown',
            name            = 'Invasion from the Unknown',
            i18n_name       = wesnoth.textdomain('wesnoth-Invasion_from_the_Unknown')('Invasion from the Unknown'),
            version         = PROJECT_ETHEA_RECONSTRUCTION_VERSION,
            abbreviation    = 'IftU',
            tracker_url     = 'https://github.com/project-ethea/Invasion_from_the_Unknown/issues',
            forum_thread    = 'https://forums.wesnoth.org/viewtopic.php?t=43309',
            maintainer_mode = filesystem.have_file('~add-ons/Invasion_from_the_Unknown/base-maint.cfg'),
        }

        check_host_compatibility('1.15.14', '1.16.x', {}, false)
        check_addon_compatibility()

        -- Load local code files.
        for i, file in ipairs {
            'overrides.lua',
            'theme.lua',

            'gui/character_descriptions_prompt.lua',
            'gui/intermission_prompt.lua',
            'gui/outro_teaser.lua',

            'Invasion_from_the_Unknown.lua',
        }
        do
            wesnoth.dofile('~add-ons/Invasion_from_the_Unknown/lua/' .. file)
        end
    >>
[/lua]

#endif

{LD /base-debug.cfg}

{LD /base-rc.cfg}
{LD /macros}

[+units]
    {LD /units}
[/units]

#ifndef __WMLUNITS__

{GLOBAL_EVENTS ({LD /global-events.cfg})}

#define MAP __FILE__
    map_file="~add-ons/Invasion_from_the_Unknown/maps/{__FILE__}"
#enddef

#define MASK __FILE__
    mask="{LD /masks/{__FILE__}}"
#enddef

#define SHROUD_DATA __FILE__
    shroud_data="{LD /masks/{__FILE__}}"
#enddef

{LD /scenarios}

#endif

#endif

# EOF

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


#textdomain wesnoth-Invasion_from_the_Unknown

[color_palette]
    faerie_spirit_hair_leaves_green=104820,458967,8DCD53,E8F898
    faerie_spirit_hair_leaves_decay=4E3430,904D39,D9A487,EBD5BC

    faerie_spirit_skin_green=662431,75556B,7B99B6,CCB1E0,D1FFFE
    faerie_spirit_skin_decay=3F281F,75556B,9B929F,E0B9B1,FFFFFF
[/color_palette]

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


#textdomain wesnoth-Invasion_from_the_Unknown

#
# Global events loaded for all scenarios
#

{AMLA_MENU_HINT}


#textdomain wesnoth-Invasion_from_the_Unknown

# WML gettext helper file to allow for easy inclusion of mainline tstrings that
# are commonly used throughout this campaign, without needing to embed textdomain
# declarations inside other files, which may be confusing and prone to human mistakes.
# They also shut up a bunch of wmllint warnings on "multiple textdomains"

################################### TEXTDOMAIN "wesnoth" ###################################
#textdomain wesnoth

#define STR_HOLY_WATER
_"Holy Water" #enddef
#define STR_HOLY_WATER_MATCHING_DESCRIPTION
_"This water will make melee weapons have the <i>arcane</i> damage type until the end of the current scenario." #enddef
#define STR_HOLY_WATER_NONMATCHING_DESCRIPTION
_"I am not suited to the use of this item! Let another take it." #enddef

################################ TEXTDOMAIN "wesnoth-units" ################################
#textdomain wesnoth-units

#define STR_SKELETON
_"Skeleton" #enddef

#define STR_ELVISH_CAPTAIN
_"Elvish Captain" #enddef
#define STR_ELVISH_HERO
_"Elvish Hero" #enddef

#define TSTR_ATTACK_NAME_FLAIL
_"flail" #enddef
#define TSTR_ATTACK_NAME_BALLISTA
_"ballista" #enddef
#define TSTR_ATTACK_NAME_MORNING_STAR
_"morning star" #enddef
#define TSTR_ATTACK_NAME_NET
_"net" #enddef
#define TSTR_ATTACK_NAME_PINCERS
_"pincers" #enddef
#define TSTR_ATTACK_NAME_MUD_GLOB
_"mud glob" #enddef
#define TSTR_ATTACK_NAME_SLAM
_"slam" #enddef
#define TSTR_ATTACK_NAME_PLAGUE_STAFF
_"plague staff" #enddef

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