#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Dreamweaver
    name= _ "Yuure Dreamweaver"
    race=demon
    gender=male,female
    image="units/demons/blue/dreamweaver-male.png"
    profile="portraits/demons/demon-dreamweaver-male.png"
    hitpoints=49
    movement_type=demonfoot
    movement=6
    experience=150
    level=3
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=47
    usage=mixed fighter
    [resistance]
        blade=40
        impact=40
        pierce=40
        cold=110
        fire=110
        arcane=80
    [/resistance]
    [movement_costs]
        deep_water=2
        shallow_water=1
        frozen=1
    [/movement_costs]
    [defense]
        deep_water=60
        shallow_water=60
        frozen=50
    [/defense]
    [abilities]
        {ABILITY_ENERVATE40}
    [/abilities]
    description= _ "In the world of dreams, a single night stretches into timeless nightmare, where incomprehensible thought morphs into eerie hallucination over the course of countless hours. With skill and knowledge of the mind's fabric, a demon becomes able to weave the transient, bizarre thoughts of the target into violent nightmares, shaping time and reality at their own whim. Mastery of the psyche is a powerful tool, and these demons are experts at wearing down their prey from afar, proving to be effective even against those with much greater raw power than themselves."
    die_sound=wail-long.wav
    [attack]
        name=lacerate
        description= _ "lacerate"
        icon="attacks/wail.png"
        type=blade
        range=melee
        [specials]
            {WEAPON_SPECIAL_POISON}
        [/specials]
        damage=6
        number=4
    [/attack]
    [attack]
        name=hallucination
        description= _ "hallucination"
        type=cold
        range=ranged
        [specials]
            {WEAPON_SPECIAL_SLOW}
        [/specials]
        damage=7
        number=4
        icon=attacks/iceball.png
    [/attack]
    [attack_anim]
        [filter_attack]
            name=lacerate
        [/filter_attack]
        start_time=-700
        offset=0.0~1.2:700,1.2~0.0:400
        [frame]
            image="units/demons/blue/dreamweaver-male-ranged1.png:150"
        [/frame]
        [frame]
            image="units/demons/blue/dreamweaver-male-ranged2.png:300"
        [/frame]
        [frame]
            image="units/demons/blue/dreamweaver-male-melee3.png:100"
        [/frame]
        [frame]
            image="units/demons/blue/dreamweaver-male-melee4.png:150"
            alpha=1~0:150
        [/frame]
        {SOUND:HIT_AND_MISS "claws.ogg" {SOUND_LIST:MISS} -100}
        [frame]
            image="units/demons/blue/dreamweaver-male-melee4.png:200"
            alpha=0~1:200
        [/frame]
        [frame]
            image="units/demons/blue/dreamweaver-male-melee5.png:200"
        [/frame]
        [frame]
            image="units/demons/blue/dreamweaver-male.png:10"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=hallucination
        [/filter_attack]
        start_time=-450
        {MISSILE_FRAME_INFERNAL_CHILL}
        [frame]
            duration=100
            image="units/demons/blue/dreamweaver-male-ranged1.png"
            halo=halo/saurian-magic-halo-1.png
        [/frame]
        [frame]
            duration=80
            image="units/demons/blue/dreamweaver-male-ranged1.png"
            halo=halo/saurian-magic-halo-2.png
            sound=magicmissile.wav
        [/frame]
        [frame]
            duration=80
            image="units/demons/blue/dreamweaver-male-ranged2.png"
            halo=halo/saurian-magic-halo-3.png
        [/frame]
        [frame]
            duration=90
            image="units/demons/blue/dreamweaver-male-ranged2.png"
            halo=halo/saurian-magic-halo-4.png
        [/frame]
        [frame]
            duration=90
            image="units/demons/blue/dreamweaver-male-ranged2.png"
            halo=halo/saurian-magic-halo-5.png
        [/frame]
        [frame]
            duration=100
            image="units/demons/blue/dreamweaver-male-ranged2.png"
            halo=halo/saurian-magic-halo-6.png
        [/frame]
        [frame]
            duration=100
            image="units/demons/blue/dreamweaver-male-ranged1.png"
            halo=halo/saurian-magic-halo-7.png
        [/frame]
    [/attack_anim]
    [defend]
        start_time=-200
        [if]
            hits=hit
            offset=0.0~-0.05:200,-0.05~0.0:200
            alpha=0.8~0.5:200,0.5~0.8:200

            hit_sound_start_time=-25
            [hit_sound_frame]
                sound=wail.wav
            [/hit_sound_frame]
        [/if]
        [else]
            hits=kill
            offset=0.0~-0.05:200,-0.05~0.0:200
            alpha=0.8~0.5:200,0.5~0.8:200
        [/else]
        [else]
            hits=miss
            offset=0.0~-0.1:200,-0.1~0.0:200
            alpha=0.8~0.25:200,0.25~0.8:200
        [/else]
        [frame]
            image=units/demons/blue/dreamweaver-male.png:1,units/demons/blue/dreamweaver-male-defend.png:325,units/demons/blue/dreamweaver-male.png:1
        [/frame]
    [/defend]
    [female]
        name= _ "female^Yuure Dreamweaver"
        gender=female
        image="units/demons/blue/dreamweaver.png"
        profile="portraits/demons/demon-dreamweaver.png"
        die_sound=wail-long.wav
        [attack_anim]
            [filter_attack]
                name=lacerate
            [/filter_attack]
            start_time=-700
            offset=0.0~1.2:700,1.2~0.0:400
            [frame]
                image="units/demons/blue/dreamweaver-ranged1.png:150"
            [/frame]
            [frame]
                image="units/demons/blue/dreamweaver-ranged2.png:300"
            [/frame]
            [frame]
                image="units/demons/blue/dreamweaver-melee3.png:100"
            [/frame]
            [frame]
                image="units/demons/blue/dreamweaver-melee4.png:150"
                alpha=1~0:150
            [/frame]
            {SOUND:HIT_AND_MISS "claws.ogg" {SOUND_LIST:MISS} -100}
            [frame]
                image="units/demons/blue/dreamweaver-melee4.png:200"
                alpha=0~1:200
            [/frame]
            [frame]
                image="units/demons/blue/dreamweaver-melee5.png:200"
            [/frame]
            [frame]
                image="units/demons/blue/dreamweaver.png:10"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=hallucination
            [/filter_attack]
            start_time=-450
            {MISSILE_FRAME_INFERNAL_CHILL}
            [frame]
                duration=100
                image="units/demons/blue/dreamweaver-ranged1.png"
                halo=halo/saurian-magic-halo-1.png
            [/frame]
            [frame]
                duration=80
                image="units/demons/blue/dreamweaver-ranged1.png"
                halo=halo/saurian-magic-halo-2.png
                sound=magicmissile.wav
            [/frame]
            [frame]
                duration=80
                image="units/demons/blue/dreamweaver-ranged2.png"
                halo=halo/saurian-magic-halo-3.png
            [/frame]
            [frame]
                duration=90
                image="units/demons/blue/dreamweaver-ranged2.png"
                halo=halo/saurian-magic-halo-4.png
            [/frame]
            [frame]
                duration=90
                image="units/demons/blue/dreamweaver-ranged2.png"
                halo=halo/saurian-magic-halo-5.png
            [/frame]
            [frame]
                duration=100
                image="units/demons/blue/dreamweaver-ranged2.png"
                halo=halo/saurian-magic-halo-6.png
            [/frame]
            [frame]
                duration=100
                image="units/demons/blue/dreamweaver-ranged1.png"
                halo=halo/saurian-magic-halo-7.png
            [/frame]
        [/attack_anim]
        [defend]
            start_time=-200
            [if]
                hits=hit
                offset=0.0~-0.05:200,-0.05~0.0:200
                alpha=0.8~0.5:200,0.5~0.8:200

                hit_sound_start_time=-25
                [hit_sound_frame]
                    sound=wail-sml.wav
                [/hit_sound_frame]
            [/if]
            [else]
                hits=kill
                offset=0.0~-0.05:200,-0.05~0.0:200
                alpha=0.8~0.5:200,0.5~0.8:200
            [/else]
            [else]
                hits=miss
                offset=0.0~-0.1:200,-0.1~0.0:200
                alpha=0.8~0.25:200,0.25~0.8:200
            [/else]
            [frame]
                image=units/demons/blue/dreamweaver.png:1,units/demons/blue/dreamweaver-defend.png:325,units/demons/blue/dreamweaver.png:1
            [/frame]
        [/defend]
    [/female]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Formling
    name= _ "Yuure Formling"
    race=demon
    gender=female
    image="units/demons/blue/formling.png"
    hitpoints=19
    movement_type=demonfly
    movement=6
    experience=41
    level=1
    alignment=chaotic
    advances_to=Demon Morphling
    cost=17
    usage=mixed fighter
    description= _ ""
    die_sound=wail-long.wav
    [abilities]
        {ABILITY_FAUX_VISAGE}
    [/abilities]
    [resistance]
        blade=30
        impact=30
        pierce=30
        cold=90
        fire=90
        arcane=110
    [/resistance]
    [attack]
        name=morph
        description= _ "morph"
        icon="attacks/wail.png"
        type=arcane
        range=melee
        [specials]
            {WEAPON_SPECIAL_COUNTERSTRIKE}
        [/specials]
        damage=6
        number=3
    [/attack]
    [attack]
        name=morph_ranged
        description= _ "morph"
        type=arcane
        range=ranged
        [specials]
            {WEAPON_SPECIAL_COUNTERSTRIKE}
        [/specials]
        damage=6
        number=3
        icon=attacks/wail.png
    [/attack]

    [attack_anim]
        [filter_attack]
            name=morph
        [/filter_attack]
        start_time=-300
        offset=0.0~1.2:300,1.5~0.0:450
        [frame]
            image="units/demons/blue/formling.png:100"
            alpha=1~0:100
        [/frame]
        [frame]
            image="units/demons/blue/formling.png:200"
            alpha=0:200
        [/frame]
        {SOUND:HIT_AND_MISS "magic-dark-big.ogg" "magic-dark-big-miss.ogg" -75}
        [frame]
            image="units/demons/blue/formling.png:50"
            alpha=0:50
        [/frame]
        [frame]
            image="units/demons/blue/formling.png:400"
            alpha=0~1:400
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=morph_ranged
        [/filter_attack]
        {MISSILE_FRAME_FAERIE_FIRE}
		start_time=-450
        {SOUND:HIT_AND_MISS magic-faeriefire.ogg magic-faeriefire-miss.ogg -450}
        [frame]
            image="units/demons/blue/formling.png"
        [/frame]
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Morphling
    name= _ "Yuure Morphling"
    race=demon
    gender=female
    image="units/demons/blue/morphling.png"
    hitpoints=28
    movement_type=demonfly
    movement=6
    experience=95
    level=2
    alignment=chaotic
    advances_to=Demon Shardling
    cost=31
    usage=mixed fighter
    description= _ ""
    die_sound=wail-long.wav
    [abilities]
        {ABILITY_FAUX_VISAGE}
    [/abilities]
    [resistance]
        blade=20
        impact=20
        pierce=20
        cold=80
        fire=80
        arcane=110
    [/resistance]
    [attack]
        name=morph
        description= _ "morph"
        icon="attacks/wail.png"
        type=arcane
        range=melee
        [specials]
            {WEAPON_SPECIAL_COUNTERSTRIKE}
        [/specials]
        damage=9
        number=3
    [/attack]
    [attack]
        name=morph_ranged
        description= _ "morph"
        type=arcane
        range=ranged
        [specials]
            {WEAPON_SPECIAL_COUNTERSTRIKE}
        [/specials]
        damage=9
        number=3
        icon=attacks/wail.png
    [/attack]

    [attack_anim]
        [filter_attack]
            name=morph
        [/filter_attack]
        start_time=-300
        offset=0.0~1.2:300,1.5~0.0:450
        [frame]
            image="units/demons/blue/morphling.png:100"
            alpha=1~0:100
        [/frame]
        [frame]
            image="units/demons/blue/morphling.png:200"
            alpha=0:200
        [/frame]
        {SOUND:HIT_AND_MISS "magic-dark-big.ogg" "magic-dark-big-miss.ogg" -75}
        [frame]
            image="units/demons/blue/morphling.png:50"
            alpha=0:50
        [/frame]
        [frame]
            image="units/demons/blue/morphling.png:400"
            alpha=0~1:400
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=morph_ranged
        [/filter_attack]
        {MISSILE_FRAME_FAERIE_FIRE}
		start_time=-450
        {SOUND:HIT_AND_MISS magic-faeriefire.ogg magic-faeriefire-miss.ogg -450}
        [frame]
            image="units/demons/blue/morphling.png"
        [/frame]
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Nightmare
    name= _ "Yuure Nightmare"
    race=demon
    gender=male,female
    image="units/demons/blue/nightmare-male.png"
    profile="portraits/demons/demon-nightmare-male.png"
    hitpoints=46
    movement_type=demonfly
    movement=9
    experience=150
    level=3
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=51
    usage=scout
    [abilities]
        {ABILITY_INCORPOREAL}
    [/abilities]
    description= _ "Hunters of dreams, some demons take on the form of the nightmares themselves. Rather than molding the mind from afar, these demons inject themselves into the visions of their targets, tearing it apart from within. Even those with greater power are under threat, for the inability to discern true physical hurt from imagined damage wreaks havoc on one's body, often translating the pain inflicted in a nightmare into actual, physical trauma. With a skilled enough hunter, death in the world of dreams cannot be distinguished from death in reality, and as the mind dies, so does the body."
    die_sound=wail-long.wav
    [resistance]
        blade=30
        impact=30
        pierce=30
        cold=110
        fire=110
        arcane=120
    [/resistance]
     [attack]
        name=infest
        description= _ "infest"
        icon="attacks/wail.png"
        type=cold
        range=melee
        [specials]
            {WEAPON_SPECIAL_POISON}
        [/specials]
        damage=10
        number=3
    [/attack]
    [attack]
        name=hallucination
        description= _ "hallucination"
        type=cold
        range=ranged
        [specials]
            {WEAPON_SPECIAL_SLOW}
        [/specials]
        damage=5
        number=4
        icon=attacks/iceball.png
    [/attack]
    [attack]
        name=nightmare
        description= _ "nightmare"
        type=blade
        range=ranged
        [specials]
            {WEAPON_SPECIAL_TERROR}
        [/specials]
        damage=7
        number=5
        icon=attacks/chakram.png
    [/attack]
    {GNS_INCORPOREAL "Demon Nightmare"}
    [attack_anim]
        [filter_attack]
            name=infest
        [/filter_attack]
        start_time=-600
        offset=0.0~-0.3:300,-0.3~1.2:300,1.2~0.0:250
        [frame]
            image="units/demons/blue/nightmare-male-melee[1~2].png:150"
        [/frame]
        [frame]
            image="units/demons/blue/nightmare-male-melee3.png:50"
        [/frame]
        [frame]
            image="units/demons/blue/nightmare-male-melee4.png:150"
            alpha=1~0:200
        [/frame]
        {SOUND:HIT_AND_MISS "magic-dark-big.ogg" "magic-dark-big-miss.ogg" -75}
        [frame]
            image="units/demons/blue/nightmare-male-melee4.png:50"
            alpha=0:50
        [/frame]
        [frame]
            image="units/demons/blue/nightmare-male-melee[4~3].png:50"
            alpha=0~1:100
        [/frame]
        [frame]
            image="units/demons/blue/nightmare-male-melee1.png:100"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=hallucination
        [/filter_attack]
        {MISSILE_FRAME_ICE}
        start_time=-350
        [frame]
            image="units/demons/blue/nightmare-male-ranged[1~3].png:100"
        [/frame]
        [frame]
            image="units/demons/blue/nightmare-male-ranged3.png:100"
        [/frame]
        [frame]
            image="units/demons/blue/nightmare-male-ranged[3~1].png:50"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=nightmare
        [/filter_attack]
        start_time=-350
        [missile_frame]
            duration=200
            image="projectiles/chakram.png"
            image_diagonal="projectiles/chakram.png"
        [/missile_frame]
        {SOUND:HIT_AND_MISS throwing-knife.ogg throwing-knife-miss.ogg -150}
        [frame]
            image="units/demons/blue/nightmare-male-ranged[1~3].png:100"
        [/frame]
        [frame]
            image="units/demons/blue/nightmare-male-ranged3.png:100"
        [/frame]
        [frame]
            image="units/demons/blue/nightmare-male-ranged[3~1].png:50"
        [/frame]
    [/attack_anim]
    [defend]
        start_time=-126
        [if]
            hits=hit
            offset=0.0~-0.05:126,-0.05~0.0:126
            alpha=0.8~0.5:126,0.5~0.8:126

            hit_sound_start_time=-25
            [hit_sound_frame]
                sound=wail.wav
            [/hit_sound_frame]
        [/if]
        [else]
            hits=kill
            offset=0.0~-0.05:126,-0.05~0.0:126
            alpha=0.8~0.5:126,0.5~0.8:126
        [/else]
        [else]
            hits=miss
            offset=0.0~-0.1:126,-0.1~0.0:126
            alpha=0.8~0.25:126,0.25~0.8:126
        [/else]
        [frame]
            image=units/demons/blue/nightmare-male.png:1,units/demons/blue/nightmare-male-melee2.png:250,units/demons/blue/nightmare-male.png:1
        [/frame]
    [/defend]

    [female]
        name= _ "female^Yuure Nightmare"
        gender=female
        image="units/demons/blue/nightmare.png"
        profile="portraits/demons/demon-nightmare.png"
        die_sound=wail-long.wav
        [attack_anim]
            [filter_attack]
                name=infest
            [/filter_attack]
            start_time=-600
            offset=0.0~-0.3:300,-0.3~1.2:300,1.2~0.0:250
            [frame]
                image="units/demons/blue/nightmare-melee[1~2].png:150"
            [/frame]
            [frame]
                image="units/demons/blue/nightmare-melee3.png:50"
            [/frame]
            [frame]
                image="units/demons/blue/nightmare-melee4.png:250"
                alpha=1~0:200
            [/frame]
            {SOUND:HIT_AND_MISS "magic-dark-big.ogg" "magic-dark-big-miss.ogg" -75}
            [frame]
                image="units/demons/blue/nightmare-melee4.png:50"
                alpha=0:50
            [/frame]
            [frame]
                image="units/demons/blue/nightmare-melee[4~3].png:50"
                alpha=0~1:100
            [/frame]
            [frame]
                image="units/demons/blue/nightmare-melee1.png:100"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=hallucination
            [/filter_attack]
            {MISSILE_FRAME_ICE}
            start_time=-350
            [frame]
                image="units/demons/blue/nightmare-ranged[1~3].png:100"
            [/frame]
            [frame]
                image="units/demons/blue/nightmare-ranged3.png:100"
            [/frame]
            [frame]
                image="units/demons/blue/nightmare-ranged[3~1].png:50"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=nightmare
            [/filter_attack]
            start_time=-350
            [missile_frame]
                duration=200
                image="projectiles/chakram.png"
                image_diagonal="projectiles/chakram.png"
            [/missile_frame]
            {SOUND:HIT_AND_MISS throwing-knife.ogg throwing-knife-miss.ogg -150}
            [frame]
                image="units/demons/blue/nightmare-ranged[1~3].png:100"
            [/frame]
            [frame]
                image="units/demons/blue/nightmare-ranged3.png:100"
            [/frame]
            [frame]
                image="units/demons/blue/nightmare-ranged[3~1].png:50"
            [/frame]
        [/attack_anim]
        [defend]
            start_time=-126
            [if]
                hits=hit
                offset=0.0~-0.05:126,-0.05~0.0:126
                alpha=0.8~0.5:126,0.5~0.8:126

                hit_sound_start_time=-25
                [hit_sound_frame]
                    sound=wail-sml.wav
                [/hit_sound_frame]
            [/if]
            [else]
                hits=kill
                offset=0.0~-0.05:126,-0.05~0.0:126
                alpha=0.8~0.5:126,0.5~0.8:126
            [/else]
            [else]
                hits=miss
                offset=0.0~-0.1:126,-0.1~0.0:126
                alpha=0.8~0.25:126,0.25~0.8:126
            [/else]
            [frame]
                image=units/demons/blue/nightmare.png:1,units/demons/blue/nightmare-melee2.png:250,units/demons/blue/nightmare.png:1
            [/frame]
        [/defend]
    [/female]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Shadow Demon
    name= _ "Yuure Shadow"
    race=demon
    gender=female
    image="units/demons/blue/shadow.png"
    profile="portraits/demons/demon-shadow.png"
    hitpoints=33
    movement_type=demonfly
    movement=7
    experience=150
    level=3
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=53
    usage=scout
    [abilities]
        {ABILITY_INCORPOREAL}
        {ABILITY_ETHEREAL}
    [/abilities]
    description= _ "In the dreams of mortals, there exist nightmarish creatures that appear to them with grotesque shapes of myriad form, hunting them through the darkness of the night. Then, there are those who remain hidden within the tiniest crevices of the warped realm of the mind, those who lurk at the edges of thought but disappear with any attention. They are the hidden terrors, the formless nightmares that are one with the shadows themselves, demons of darkness and terrors of the unknown."
    die_sound=wail-long.wav
    [resistance]
        blade=30
        impact=30
        pierce=30
        cold=70
        fire=30
        arcane=30
    [/resistance]
    [attack]
        name=tear
        description= _ "tear"
        icon="attacks/claws-undead.png"
        type=blade
        range=melee
        [specials]
            {WEAPON_SPECIAL_BACKSTAB}
        [/specials]
        damage=7
        number=3
    [/attack]
    [attack]
        name=blackness
        description= _ "blackness"
        type=arcane
        range=ranged
        [specials]
            {WEAPON_SPECIAL_CHAOS}
        [/specials]
        damage=6
        number=5
        icon=attacks/noctum.png
    [/attack]
    {GNS_INCORPOREAL "Shadow Demon"}
    {ETHEREAL "Shadow Demon"}
    [attack_anim]
        [filter_attack]
            name=tear
        [/filter_attack]
        start_time=-450
        offset=0.0:250,0.0~1.2:200,1.2~0.0:350
        [frame]
            image="units/demons/blue/shadow-melee1.png:125"
        [/frame]
        [frame]
            image="units/demons/blue/shadow-melee2.png:125"
        [/frame]
        [frame]
            image="units/demons/blue/shadow-melee3.png:50"
        [/frame]
        [frame]
            image="units/demons/blue/shadow-melee4.png:150"
            alpha=1~0:100
        [/frame]
        {SOUND:HIT_AND_MISS "claws.ogg" {SOUND_LIST:MISS} -100}
        [frame]
            image="units/demons/blue/shadow-melee4.png:150"
            alpha=0~1:150
        [/frame]
        [frame]
            image="units/demons/blue/shadow-melee5.png:200"
        [/frame]
        [frame]
            image="units/demons/blue/shadow.png:10"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=blackness
        [/filter_attack]
        {MISSILE_FRAME_SHADOW_WAVE}
        start_time=-350
        [frame]
            image="units/demons/blue/shadow-ranged[1~3].png:100"
        [/frame]
        {SOUND:HIT_AND_MISS "magic-dark-big.ogg" "magic-dark-big-miss.ogg" -75}
        [frame]
            image="units/demons/blue/shadow-ranged3.png:100"
        [/frame]
        [frame]
            image="units/demons/blue/shadow-ranged[3~1].png:50"
        [/frame]
    [/attack_anim]
    [defend]
        start_time=-200
        [if]
            hits=hit
            offset=0.0~-0.05:200,-0.05~0.0:200
            alpha=0.8~0.5:200,0.5~0.8:200

            hit_sound_start_time=-25
            [hit_sound_frame]
                sound=wail-sml.wav
            [/hit_sound_frame]
        [/if]
        [else]
            hits=kill
            offset=0.0~-0.05:200,-0.05~0.0:200
            alpha=0.8~0.5:200,0.5~0.8:200
        [/else]
        [else]
            hits=miss
            offset=0.0~-0.1:200,-0.1~0.0:200
            alpha=0.8~0.25:200,0.25~0.8:200
        [/else]
        [frame]
            image=units/demons/blue/shadow.png:1,units/demons/blue/shadow-defend.png:325,units/demons/blue/shadow.png:1
        [/frame]
    [/defend]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Shardling
    name= _ "Yuure Shardling"
    race=demon
    gender=female
    image="units/demons/blue/shardling.png"
    hitpoints=41
    movement_type=demonfly
    movement=6
    experience=150
    level=3
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=31
    usage=mixed fighter
    description= _ ""
    die_sound=wail-long.wav
    [abilities]
        {ABILITY_FAUX_VISAGE}
    [/abilities]
    [resistance]
        blade=10
        impact=10
        pierce=10
        cold=70
        fire=70
        arcane=110
    [/resistance]
    [attack]
        name=morph
        description= _ "morph"
        icon="attacks/wail.png"
        type=arcane
        range=melee
        [specials]
            {WEAPON_SPECIAL_COUNTERSTRIKE}
        [/specials]
        damage=12
        number=3
    [/attack]
    [attack]
        name=morph_ranged
        description= _ "morph"
        type=arcane
        range=ranged
        [specials]
            {WEAPON_SPECIAL_COUNTERSTRIKE}
        [/specials]
        damage=12
        number=3
        icon=attacks/wail.png
    [/attack]
    [attack]
        name=black shard
        description= _ "black shard"
        type=cold
        range=ranged
        [specials]
            {WEAPON_SPECIAL_CHAOS}
        [/specials]
        damage=17
        number=2
        icon=attacks/wail.png
    [/attack]

    [attack_anim]
        [filter_attack]
            name=morph
        [/filter_attack]
        start_time=-300
        offset=0.0~1.2:300,1.5~0.0:450
        [frame]
            image="units/demons/blue/shardling.png:100"
            alpha=1~0:100
        [/frame]
        [frame]
            image="units/demons/blue/shardling.png:200"
            alpha=0:200
        [/frame]
        {SOUND:HIT_AND_MISS "magic-dark-big.ogg" "magic-dark-big-miss.ogg" -75}
        [frame]
            image="units/demons/blue/shardling.png:50"
            alpha=0:50
        [/frame]
        [frame]
            image="units/demons/blue/shardling.png:400"
            alpha=0~1:400
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=morph_ranged
        [/filter_attack]
        {MISSILE_FRAME_FAERIE_FIRE}
        start_time=-450
        {SOUND:HIT_AND_MISS magic-faeriefire.ogg magic-faeriefire-miss.ogg -450}
        [frame]
            image="units/demons/blue/shardling.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=black shard
        [/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]
            image="units/demons/blue/shardling.png"
            halo="halo/undead/dark-magic-[1~6].png:50"
            halo_x,halo_y=10,15
        [/frame]

        [frame]
            image="units/demons/blue/shardling.png:100"
        [/frame]

        {SOUND:HIT_AND_MISS magic-dark.ogg magic-dark-miss.ogg -50}
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Incubus
    name= _ "Incubus"
    race=demon
    image="units/demons/blue/incubus.png"
	profile="portraits/demons/demon-incubus.png"
    hitpoints=67
    movement_type=demonfly
    movement=7
    experience=200
    level=4
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=110
    usage=mixed fighter
    [resistance]
        blade=30
        pierce=30
        impact=30
        cold=150
        fire=100
        arcane=100
    [/resistance]
    description= _ "The counterpart to Succubi, Incubi represent infestations of the mind rather than that of the body. They are well versed in the psyche of mortals and demons alike, masters of manipulation and psychological torture. Incubi excel at conquering targets without physical battle, but when motivated to fight, are certainly capable of holding their own against other powerful demons as well."
    die_sound=wail-long.wav
    [abilities]
        {ABILITY_ETHEREAL}
    [/abilities]
    [attack]
        name=dreamwalk
        description= _ "dreamwalk"
        type=arcane
        range=melee
        damage=15
        number=3
        icon=attacks/wail.png
        [specials]
            {WEAPON_SPECIAL_COUNTERSTRIKE}
        [/specials]
    [/attack]
    [attack]
        name=nightmare
        description= _ "nightmare"
        type=blade
        range=ranged
        [specials]
            {WEAPON_SPECIAL_TERROR}
        [/specials]
        damage=10
        number=5
        icon=attacks/chakram.png
    [/attack]
    {ETHEREAL "Demon Incubus"}
    [attack_anim]
        [filter_attack]
            name=dreamwalk
        [/filter_attack]
        start_time=-600
        offset=0.0~-0.3:300,-0.3~1.2:300,1.0~0.0:350
        [frame]
            image="units/demons/blue/incubus-melee[1~2].png:150"
        [/frame]
        [frame]
            image="units/demons/blue/incubus-melee3.png:75"
        [/frame]
        [frame]
            image="units/demons/blue/incubus-melee4.png:225"
            alpha=1~0:225
        [/frame]
        {SOUND:HIT_AND_MISS "magic-dark-big.ogg" "magic-dark-big-miss.ogg" -75}
        [frame]
            image="units/demons/blue/incubus-melee4.png:50"
            alpha=0:50
        [/frame]
        [frame]
            image="units/demons/blue/incubus-melee[4~3].png:100"
            alpha=0~1:200
        [/frame]
        [frame]
            image="units/demons/blue/incubus-melee1.png:75"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=nightmare
        [/filter_attack]
        start_time=-350
        [missile_frame]
            duration=200
            image="projectiles/chakram.png"
            image_diagonal="projectiles/chakram.png"
        [/missile_frame]
        {SOUND:HIT_AND_MISS throwing-knife.ogg throwing-knife-miss.ogg -150}
        [frame]
            image="units/demons/blue/incubus-ranged[1~3].png:100"
        [/frame]
        [frame]
            image="units/demons/blue/incubus-ranged3.png:100"
        [/frame]
        [frame]
            image="units/demons/blue/incubus-ranged[3~1].png:50"
        [/frame]
    [/attack_anim]
    [defend]
        start_time=-126
        [if]
            hits=hit
            offset=0.0~-0.05:126,-0.05~0.0:126
            alpha=0.8~0.5:126,0.5~0.8:126

            hit_sound_start_time=-25
            [hit_sound_frame]
                sound=wail.wav
            [/hit_sound_frame]
        [/if]
        [else]
            hits=kill
            offset=0.0~-0.05:126,-0.05~0.0:126
            alpha=0.8~0.5:126,0.5~0.8:126
        [/else]
        [else]
            hits=miss
            offset=0.0~-0.1:126,-0.1~0.0:126
            alpha=0.8~0.25:126,0.25~0.8:126
        [/else]
        [frame]
            image=units/demons/blue/incubus.png:1,units/demons/blue/incubus-defend.png:250,units/demons/blue/incubus.png:1
        [/frame]
    [/defend]

    [variation]
        variation_id=incubus1
        inherit=no
        id=Demon Incubus
        name= _ "Incubus"
        race=demon
        image="units/demons/blue/incubus.png"
        hitpoints=83
        movement_type=demonfly
        movement=7
        experience=200
        level=4
        alignment=neutral
        advances_to=null
        {AMLA_DEFAULT}
        cost=110
        usage=mixed fighter
        description= _ "The counterpart to Succubi, Incubi represent infestations of the mind rather than that of the body. They are well versed in the psyche of mortals and demons alike, masters of manipulation and psychological torture. Incubi excel at conquering targets without physical battle, but when motivated to fight, are certainly capable of holding their own against other powerful demons as well."
        die_sound=wail-long.wav
        [abilities]
            {ABILITY_ETHEREAL}
        [/abilities]
        [resistance]
            blade=30
            pierce=30
            impact=30
            cold=150
            fire=100
            arcane=100
        [/resistance]
        [attack]
            name=dreamwalk
            description= _ "dreamwalk"
            type=arcane
            range=melee
            damage=21
            number=3
            icon=attacks/wail.png
            [specials]
                {WEAPON_SPECIAL_COUNTERSTRIKE}
            [/specials]
        [/attack]
        [attack]
            name=nightmare
            description= _ "nightmare"
            type=blade
            range=ranged
            [specials]
                {WEAPON_SPECIAL_TERROR}
            [/specials]
            damage=15
            number=5
            icon=attacks/chakram.png
        [/attack]
        {ETHEREAL "Demon Incubus"}
        [attack_anim]
            [filter_attack]
                name=dreamwalk
            [/filter_attack]
            start_time=-600
            offset=0.0~-0.5:300,-0.5~1.2:300,1.0~0.0:350
            [frame]
                image="units/demons/blue/incubus-melee[1~2].png:150"
            [/frame]
            [frame]
                image="units/demons/blue/incubus-melee3.png:75"
            [/frame]
            [frame]
                image="units/demons/blue/incubus-melee4.png:250"
                alpha=1~0:200
            [/frame]
            {SOUND:HIT_AND_MISS "magic-dark-big.ogg" "magic-dark-big-miss.ogg" -75}
            [frame]
                image="units/demons/blue/incubus-melee4.png:50"
                alpha=0:50
            [/frame]
            [frame]
                image="units/demons/blue/incubus-melee[4~3].png:100"
                alpha=0~1:200
            [/frame]
            [frame]
                image="units/demons/blue/incubus-melee1.png:75"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=nightmare
            [/filter_attack]
            start_time=-350
            [missile_frame]
                duration=200
                image="projectiles/chakram.png"
                image_diagonal="projectiles/chakram.png"
            [/missile_frame]
            {SOUND:HIT_AND_MISS throwing-knife.ogg throwing-knife-miss.ogg -150}
            [frame]
                image="units/demons/blue/incubus-ranged[1~3].png:100"
            [/frame]
            [frame]
                image="units/demons/blue/incubus-ranged3.png:100"
            [/frame]
            [frame]
                image="units/demons/blue/incubus-ranged[3~1].png:50"
            [/frame]
        [/attack_anim]
        [defend]
            start_time=-126
            [if]
                hits=hit
                offset=0.0~-0.05:126,-0.05~0.0:126
                alpha=0.8~0.5:126,0.5~0.8:126

                hit_sound_start_time=-25
                [hit_sound_frame]
                    sound=wail.wav
                [/hit_sound_frame]
            [/if]
            [else]
                hits=kill
                offset=0.0~-0.05:126,-0.05~0.0:126
                alpha=0.8~0.5:126,0.5~0.8:126
            [/else]
            [else]
                hits=miss
                offset=0.0~-0.1:126,-0.1~0.0:126
                alpha=0.8~0.25:126,0.25~0.8:126
            [/else]
            [frame]
                image=units/demons/blue/incubus.png:1,units/demons/blue/incubus-defend.png:250,units/demons/blue/incubus.png:1
            [/frame]
        [/defend]
    [/variation]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=GNS_Gate
    name= _ "Gate"
    race=mechanical
    image="misc/blank-hex.png"
	image_icon="terrain/dark-gate-se.png"
    ellipse=none
    hitpoints=8
    movement_type=null
    movement=1
    level=0
    alignment=neutral
    advances_to=null
    cost=1
    usage=null
    hide_help=true
    description= _ ""
    {DEFENSE_ANIM "misc/blank-hex.png" "misc/blank-hex.png" gate.ogg}
    die_sound=gate-fall.ogg
    [death]
        start_time=0
        [frame]
            duration,image=0,"misc/blank-hex.png"
        [/frame]
    [/death]
	[event]
        name=last breath
        first_time_only=no
        [filter]
            type=GNS_Gate
        [/filter]

        [remove_terrain_overlays]
            x,y=$x1,$y1
        [/remove_terrain_overlays]

        [redraw][/redraw]
    [/event]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Guardian of Darkness
    name= _ "female^Guardian of Darkness"
    race=demon
    gender=female
    image="units/guardians/merthiaal.png"
    #profile="portraits/xiael.png"
    hitpoints=630
    movement_type=guardian
    movement=11
    experience=450
    level=9
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=820
    usage=archer
    hide_help=true
    undead_variation=null
    description= _ "There is no accurate information available about this class of beings at this time."
    die_sound={SOUND_LIST:ELF_FEMALE_HIT}
    [attack]
        name=faerie touch
        description=_ "faerie touch"
        icon=attacks/touch-faerie.png
        type=impact
        damage=15
        number=3
        range=melee
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]
    [attack]
        name=noctum
        description= _ "noctum"
        type=arcane
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=17
        number=6
        icon=attacks/noctum.png
    [/attack]

    {GUARDIAN_DEFENSE_ANIM 0 255 0 "units/guardians/merthiaal.png" "units/guardians/merthiaal.png" {SOUND_LIST:ELF_FEMALE_HIT} }

    [standing_anim]
        start_time=0
        direction=n,ne,se,s
        [frame]
            image="units/guardians/merthiaal.png:3000"
            halo="halo/guardians/merthiaal-halo.png~O([60~100,100~60]%):75"
        [/frame]
    [/standing_anim]

    [standing_anim]
        start_time=0
        direction=nw,sw
        [frame]
            image="units/guardians/merthiaal.png:3000"
            halo="halo/guardians/merthiaal-halo.png~O([60~100,100~60]%):75"
        [/frame]
    [/standing_anim]

[/unit_type]

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


#textdomain wesnoth-Genesis

[unit_type]
    id=Guardian of Earth
    name= _ "female^Guardian of Earth"
    race=faerie
    gender=female
    image="units/guardians/guardian-of-earth-xiael.png"
    image_icon="units/guardians/guardian-of-earth-xiael.png~CROP(32,28,72,72)"
    profile="units/guardians/guardian-of-earth-xiael.png~CROP(27,28,79,71)"
    #profile="portraits/xiael.png"
    hitpoints=777
    movement_type=guardian
    movement=7
    experience=450
    level=9
    bar_offset_x,bar_offset_y=0,0
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=820
    usage=healer
    hide_help=true
    undead_variation=null
    description= _ "There is no accurate information available about this class of beings at this time."
    die_sound={SOUND_LIST:ELF_FEMALE_HIT}
    [attack]
        name=faerie touch
        description=_ "faerie touch"
        icon=attacks/touch-faerie.png
        type=impact
        damage=21
        number=3
        range=melee
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]
    [attack]
        name=ensnare
        description=_ "ensnare"
        type=impact
        [specials]
            {WEAPON_SPECIAL_SLOW}
        [/specials]
        damage=21
        number=4
        range=ranged
        icon=attacks/entangle.png
    [/attack]
    [attack]
        name=faerieborn blaze
        description= _ "faerieborn blaze"
        icon=attacks/arcane-rage.png
        type=arcane
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
        damage=27
        number=5
        range=ranged
    [/attack]

    {GUARDIAN_DEFENSE_ANIM 0 255 0 "units/guardians/guardian-of-earth-xiael.png" "units/guardians/guardian-of-earth-xiael.png" {SOUND_LIST:ELF_FEMALE_HIT} }

    [standing_anim]
        start_time=0
        direction=n,ne,se,s
        [frame]
            image="units/guardians/guardian-of-earth-xiael.png:3000"
            halo="halo/guardians/xiael-full.png~O([60~100,100~60]%):75"
        [/frame]
    [/standing_anim]

    [standing_anim]
        start_time=0
        direction=nw,sw
        [frame]
            image="units/guardians/guardian-of-earth-xiael.png:3000"
            halo="halo/guardians/xiael-full.png~O([60~100,100~60]%):75"
        [/frame]
    [/standing_anim]

[/unit_type]

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


#textdomain wesnoth-Genesis

[unit_type]
    id=Guardian of Life
    name= _ "female^Guardian of Life"
    race=demon
    gender=female
    image="units/guardians/guardian-of-life-uria.png"
    # Fixes unit sprite alignment since we don't have a portrait yet.
    profile="units/guardians/guardian-of-life-uria.png~CROP(25,20,90,80)"
    hitpoints=813
    movement_type=guardian
    movement=7
    experience=450
    level=9
    bar_offset_x,bar_offset_y=0,0
    alignment=neutral
    advances_to=null
    {AMLA_DEFAULT}
    cost=1180
    usage=healer
    hide_help=true
    undead_variation=null
    description= _ "There is no information available about this class of beings at this time."
    die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}

    {DEFENSE_ANIM "units/guardians/guardian-of-life-uria.png" "units/guardians/guardian-of-life-uria.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }

    [standing_anim]
        start_time=0
        direction=n,ne,se,s
        [frame]
            image="units/guardians/guardian-of-life-uria.png:3000"
            halo="halo/guardians/uria-halo.png~O([60~100,100~60]%):75"
        [/frame]
    [/standing_anim]

    [standing_anim]
        start_time=0
        direction=nw,sw
        [frame]
            image="units/guardians/guardian-of-life-uria.png:3000"
            halo="halo/guardians/uria-halo.png~O([60~100,100~60]%):75"
        [/frame]
    [/standing_anim]

    [attack]
        name=celestial star
        description= _ "celestial star"
        icon=attacks/mace-and-chain.png
        type=impact
        damage=17
        number=4
        range=melee
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]
    [attack]
        name=blazing star
        description= _ "blazing star"
        icon=attacks/hellbent-tide.png
        type=fire
        damage=47
        number=3
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]
    [attack]
        name=breath of thanatos
        description= _ "breath of thanatos"
        icon=attacks/breath-of-thanatos.png
        type=arcane
        damage=31
        number=5
        range=ranged
        [specials]
            {WEAPON_SPECIAL_MAGICAL}
        [/specials]
    [/attack]
[/unit_type]


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Armageddon Imp
    name= _ "Armageddon Imp"
    race=imps
    image="units/imps/imp-armageddon.png"
    hitpoints=79
    movement_type=demonfoot
    movement=5
    experience=200
    level=4
    {AMLA_DEFAULT}
    alignment=chaotic
    advances_to=null
    cost=110
    usage=fighter
    description= _ "The rumors about Imps big as a tree have been, unfortunately, confirmed. Never seen before, the Imps of Armageddon are the masterminds of Chaos, and albeit usually hidden at safe distance from the battlefield, they sometimes decide to charge themselves against the unwary enemies, who are nothing but dirt compared to these gigantic beasts. That, and their unnatural strength and endurance, is why their are feared, not only by the opponents of the Chaos Empire, but also by lesser imps and most demons of the same band.

If you ever get to face one of these colossal brutes, escape as soon as possible from the battlefield or be known to you that death is certain to arrive."
    die_sound={SOUND_LIST:IMP_DIE}
    [resistance]
        blade=80
        impact=80
        fire=70
    [/resistance]
    {DEFENSE_ANIM "units/imps/imp-armageddon.png" "units/imps/imp-armageddon.png" {SOUND_LIST:IMP_HIT} }
    [attack]
        name=blade of doom
        description=_"blade of doom"
        icon=attacks/baneblade.png
        type=blade
        range=melee
        damage=11
        number=4
        [specials]
            {WEAPON_SPECIAL_DRAIN}
        [/specials]
    [/attack]
    [attack]
        name=slime
        description=_"slime spit"
        icon=attacks/slime-thrown.png
        type=pierce
        range=ranged
        damage=8
        number=3
        [specials]
            {WEAPON_SPECIAL_POISON}
        [/specials]
    [/attack]
    [attack_anim]
        [filter_attack]
            name=blade of doom
        [/filter_attack]
        start_time=-225
        [frame]
            duration=125
            image="units/imps/imp-armageddon.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=100
                image="units/imps/imp-armageddon.png"
                sound={SOUND_LIST:SWORD_SWISH}
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=100
                image="units/imps/imp-armageddon.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=100
            image="units/imps/imp-armageddon.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=slime
        [/filter_attack]
        start_time=-180
        [missile_frame]
            begin=-150
            end=0
            image="projectiles/slime-glob.png"
            image_diagonal="projectiles/slime-glob.png"
        [/missile_frame]
        [if]
            hits=yes
            [frame]
                duration=80
                image="units/imps/imp-armageddon.png"
                sound=squishy-strike.wav
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=80
                image="units/imps/imp-armageddon.png"
                sound=squishy-miss.wav
            [/frame]
        [/else]
        [frame]
            duration=100
            image="units/imps/imp-armageddon.png"
        [/frame]
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Blood Imp
    name= _ "Blood Imp"
    race=imps
    image="units/imps/imp-blood.png"
    hitpoints=44
    movement_type=demonfoot
    movement=5
    experience=70
    level=2
    alignment=chaotic
    advances_to=Gutwrencher Imp
    cost=30
    usage=fighter
    description= _ "Some Imps grow stronger, bigger and more violent. That leads people to call them ‘Blood’ Imps. They can even be a menace to an lonely experienced fighter if he or she is alone."
    die_sound={SOUND_LIST:IMP_DIE}
    [resistance]
        fire=90
    [/resistance]
    {DEFENSE_ANIM "units/imps/imp-blood.png" "units/imps/imp-blood.png" {SOUND_LIST:IMP_HIT} }
    [attack]
        name=claws
        description=_ "claws"
        icon=attacks/claws-undead.png
        type=blade
        range=melee
        damage=6
        number=3
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        start_time=-125
        [if]
            hits=yes
            [frame]
                duration=75
                image="units/imps/imp-blood.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=75
                image="units/imps/imp-blood.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=150
            image="units/imps/imp-blood.png"
        [/frame]
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Gutwrencher Imp
    name= _ "Gutwrencher Imp"
    race=imps
    image="units/imps/imp-gutwrencher.png"
    hitpoints=58
    movement_type=demonfoot
    movement=5
    experience=220
    level=3
    alignment=chaotic
    advances_to=Armageddon Imp
    cost=57
    usage=fighter
    description= _ "It is not usual for an Imp to grow much above the size they had when born, nor to acquire intellect, in any sense. However, the unusual happens, and then it is possible for some of them to grow stronger and smarter in their attacks, to the point that they, instead of being cannon-fodder or suicidal attack force of demons, get to lead small groups of them, not having any armor or weapons other than their natural toughness and brute strength. As they delight in tearing their prey to pieces, they have been titled the ‘Gutwrenchers’ by those who have survived the horrendous event.

With time, they have developed a new dreadful attack weapon: acid slime, which can melt a human, or even orc, in matter of seconds. They spit it towards they victim, wait until it has consumed most of its body, and then finish the job swallowing the remaining flesh and bones. Worse than worse, they can now drain vital energy from their victims at close contact.

Fortunately, abominations such as these are rarely seen in greater numbers. It is also said that there are Imps bigger than a full-grown Troll, but the rumors have not been confirmed... yet."
    die_sound={SOUND_LIST:IMP_DIE}
    [resistance]
        blade=90
        fire=80
    [/resistance]
    {DEFENSE_ANIM "units/imps/imp-gutwrencher.png" "units/imps/imp-gutwrencher.png" {SOUND_LIST:IMP_HIT} }
    [attack]
        name=claws
        description=_ "claws"
        icon=attacks/claws-undead.png
        type=blade
        range=melee
        damage=9
        number=4
        [specials]
            {WEAPON_SPECIAL_DRAIN}
        [/specials]
    [/attack]
    [attack]
        name=slime
        description=_"slime spit"
        icon=attacks/slime-thrown.png
        type=pierce
        range=ranged
        damage=6
        number=3
        [specials]
            {WEAPON_SPECIAL_POISON}
        [/specials]
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        start_time=-125
        [if]
            hits=yes
            [frame]
                duration=75
                image="units/imps/imp-gutwrencher.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=75
                image="units/imps/imp-gutwrencher.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=150
            image="units/imps/imp-gutwrencher.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=slime
        [/filter_attack]
        start_time=-180
        {MISSILE_FRAME_SLIME}
        [if]
            hits=yes
            [frame]
                duration=80
                image="units/imps/imp-gutwrencher.png"
                sound=squishy-strike.wav
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=80
                image="units/imps/imp-gutwrencher.png"
                sound=squishy-miss.wav
            [/frame]
        [/else]
        [frame]
            duration=100
            image="units/imps/imp-gutwrencher.png"
        [/frame]
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Imp
    name= _ "Imp"
    race=imps
    image="units/imps/imp.png"
    hitpoints=31
    movement_type=impfoot
    movement=5
    experience=50
    level=1
    alignment=chaotic
    advances_to=Blood Imp
    cost=18
    usage=fighter
    description= _ "Frequently considered lesser relatives of demons, the Imps are often underestimated due to their small size and lack of intellect. It is noteworthy, however, that a swarm of them is not a threat to ignore, even for an experienced soldier. They are mainly used by demonic attack forces as cannon-fodder to distract the enemy while the battle lords prepare the actual strike. However, it is rumored that some of these imps have grown bigger and stronger, enough to be a real strike force by themselves, which automatically promotes them to a higher level in the military ranks of Chaos."
    die_sound={SOUND_LIST:IMP_DIE}
    {DEFENSE_ANIM "units/imps/imp.png" "units/imps/imp.png" {SOUND_LIST:IMP_HIT} }
    [attack]
        name=claws
        description=_ "claws"
        icon=attacks/claws-undead.png
        type=blade
        range=melee
        damage=5
        number=3
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        start_time=-125
        [if]
            hits=yes
            [frame]
                duration=75
                image="units/imps/imp.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=75
                image="units/imps/imp.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=150
            image="units/imps/imp.png"
        [/frame]
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Minor Imp
    name= _ "Minor Imp"
    race=imps
    image="units/imps/imp-minor.png"
    hitpoints=19
    movement_type=impfoot
    movement=5
    experience=35
    level=0
    alignment=chaotic
    advances_to=Imp
    cost=6
    usage=fighter
    description= _ "The recently born hatchlings of imps are called ‘minor’ by their enemies. Although they are rarely little more than a lesser annoyance in most situations, with time and proper raising, they can turn into real enemies, the medium-sized Imps."
    die_sound={SOUND_LIST:IMP_DIE}
    [resistance]
        impact=120
    [/resistance]
    {DEFENSE_ANIM "units/imps/imp-minor.png" "units/imps/imp-minor.png" {SOUND_LIST:IMP_HIT} }
    [attack]
        name=claws
        description=_ "claws"
        icon=attacks/claws-undead.png
        type=blade
        range=melee
        damage=4
        number=2
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        start_time=-125
        [if]
            hits=yes
            [frame]
                duration=75
                image="units/imps/imp-minor.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=75
                image="units/imps/imp-minor.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=150
            image="units/imps/imp-minor.png"
        [/frame]
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Serpent Messenger
    name= _ "Serpent Messenger"
    race=imps
    image="units/imps/serpent-messenger.png"
    image_icon="units/imps/serpent-messenger.png~SCALE(72,72)"
    hitpoints=63
    movement_type=demonfly
    movement=6
    experience=150
    {AMLA_DEFAULT}
    level=3
    alignment=chaotic
    advances_to=null
    cost=56
    usage=scout
    [abilities]
        {ABILITY_TERROR_LEVEL_3}
    [/abilities]
    description= _ "Legend tells of the mighty serpent god who defied Uria and was shortly defeated by her. In order to set an example for other demon lords who could consider defying or betraying her, his soul was sealed into stone. His followers—once worshipers of the power of light—were turned to the darkness and changed into wretched creatures charged with the mission of spreading fear and panic to dishearten her victims.

Regardless of the veracity of their origins, they can be quite effective against lesser creatures and the weak-willed, whereas brave and experienced warriors find them to be little more than a nuisance on the battlefield."
    die_sound=drake-die.ogg
    {DEFENSE_ANIM "units/imps/serpent-messenger.png" "units/imps/serpent-messenger.png" {SOUND_LIST:DRAKE_HIT} }
    [attack]
        name=fangs
        description=_ "fangs"
        icon=attacks/fangs-animal.png
        type=blade
        range=melee
        damage=10
        number=3
        [specials]
            {WEAPON_SPECIAL_DRAIN}
        [/specials]
    [/attack]
    [attack_anim]
        [filter_attack]
            name=fangs
        [/filter_attack]
        [frame]
            begin=-350
            end=-250
            image="units/imps/serpent-messenger.png"
        [/frame]
        [frame]
            begin=-250
            end=-100
            image="units/imps/serpent-messenger.png"
        [/frame]
        [if]
            hits=no
            [frame]
                begin=-100
                end=-50
                image="units/imps/serpent-messenger.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                begin=-100
                end=-50
                image="units/imps/serpent-messenger.png"
                sound=bite.ogg
            [/frame]
        [/else]
        [frame]
            begin=-50
            end=200
            image="units/imps/serpent-messenger.png"
        [/frame]
    [/attack_anim]
[/unit_type]

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


#textdomain wesnoth-After_the_Storm

[unit_type]
    id=Valdemon Basher
    name= _ "Valdemon Basher"
    race=imps
    image="units/imps/valdemon-basher.png"
    hitpoints=52
    movement_type=valdemonfoot
    movement=5
    experience=100
    {AMLA_DEFAULT}
    level=2
    alignment=chaotic
    advances_to=null
    cost=34
    usage=fighter
    [abilities]
        {ABILITY_STEADFAST}
    [/abilities]
    description= _ "While these behemoths—native to the shores of Inferno—are remarkably dumb, they are quite skilled at using their heads—literally—to knock their opponents out of the way, allowing their smarter allies to trespass their defenses."
    die_sound=yeti-die.ogg
    {DEFENSE_ANIM "units/imps/valdemon-basher.png" "units/imps/valdemon-basher.png" yeti-hit.ogg }
    [attack]
        name=ram
        description=_ "ram"
        icon=attacks/ram.png
        type=impact
        range=melee
        damage=11
        number=2
    [/attack]
    [attack]
        name=claws
        description=_ "claws"
        icon=attacks/claws-animal.png
        type=blade
        range=melee
        damage=8
        number=3
    [/attack]

    [attack_anim]
        [filter_attack]
            name=ram
        [/filter_attack]
        start_time=-300
        [frame]
            duration=225
            image="units/imps/valdemon-basher.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=100
                image="units/imps/valdemon-basher.png"
                sound=mace.wav
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=100
                image="units/imps/valdemon-basher.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=300
            image="units/imps/valdemon-basher.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        start_time=-250
        [frame]
            duration=125
            image="units/imps/valdemon-basher.png"
        [/frame]
        [if]
            hits=yes
            [frame]
                duration=75
                image="units/imps/valdemon-basher.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                duration=75
                image="units/imps/valdemon-basher.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            duration=250
            image="units/imps/valdemon-basher.png"
        [/frame]
    [/attack_anim]
[/unit_type]

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


#textdomain wesnoth-Genesis

[unit_type]
    id=Chaos Hound
    name= _ "Rabid Hound"
    race=monster
    image="units/monsters/hound.png"
    hitpoints=22
    movement_type=houndfoot
    movement=7
    experience=40
    level=1
    alignment=chaotic
    advances_to=Demonic Hound
    cost=20
    usage=fighter
    undead_variation=saurian
    description= _ "Quite fragile in combat, the Hounds of Chaos are directly affected by the magic of the chaos magi, resulting in them listening and obeying every command of their masters. The results are mindless effective assassins. Though they are easily taken care of by a tougher adversary, their nimble bodies allow them to penetrate far into enemy lines and severely damage their support units."
    die_sound={SOUND_LIST:WOLF_DIE}
    {DEFENSE_ANIM "units/monsters/hound-defend.png" "units/monsters/hound.png" {SOUND_LIST:WOLF_HIT} }
    [attack]
        name=fangs
        description= _ "fangs"
        icon=attacks/fangs-animal.png
        type=blade
        range=melee
        [specials]
            {WEAPON_SPECIAL_BERSERK}
        [/specials]
        damage=5
        number=2
    [/attack]
    [attack_anim]
        [filter_attack]
            name=fangs
        [/filter_attack]
        offset=0.0~-0.1:100,-0.1~0.0:50,0.0~0.3:50,0.3~0.5:100,0.5~0.6:50,0.6~0.4:100,0.4~0.2:50,0.2~0.0:100
        [frame]
            begin=-350
            end=-100
            image="units/monsters/hound-attack1.png"
            sound={SOUND_LIST:WOLF_GROWL}
        [/frame]
        [if]
            hits=no
            [frame]
                begin=-100
                end=0
                image="units/monsters/hound-attack2.png"
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                begin=-100
                end=0
                image="units/monsters/hound-attack2.png"
                sound=bite.ogg
            [/frame]
        [/else]
        [frame]
            begin=0
            end=250
            image="units/monsters/hound-attack1.png"
        [/frame]
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demonic Hound
    name= _ "Demonic Hound"
    race=monster
    image="units/monsters/rabid-hound.png"
    [movement_anim]
        [frame]
            begin=0
            end=150
            image="units/monsters/rabid-hound-attack2.png"
        [/frame]
    [/movement_anim]
    hitpoints=35
    movement_type=houndfoot
    movement=7
    experience=70
    level=2
    alignment=chaotic
    advances_to=Hellhound
    cost=40
    usage=fighter
    undead_variation=saurian
    description= _ "Hounds who serve the power of Chaos are slowly consumed by its essence, just like their human masters and comrades. Aside from the involved removal of their souls and the increased bodily strength, demonic hounds acquire a more developed intellect, which turns them into more perilous foes who will not stop at anything but the accomplishment of their purpose and desire of bloodbath."
    die_sound={SOUND_LIST:WOLF_DIE}
    {DEFENSE_ANIM "units/monsters/rabid-hound-defend.png" "units/monsters/rabid-hound.png" {SOUND_LIST:WOLF_HIT} }
    [attack]
        name=fangs
        description= _ "fangs"
        icon=attacks/fangs-animal.png
        type=blade
        range=melee
        [specials]
            {WEAPON_SPECIAL_BERSERK}
        [/specials]
        damage=6
        number=3
    [/attack]
    [attack_anim]
        [filter_attack]
            name=fangs
        [/filter_attack]
        offset=0.0~-0.1:100,-0.1~0.0:50,0.0~0.3:50,0.3~0.5:100,0.5~0.6:50,0.6~0.4:100,0.4~0.2:50,0.2~0.0:100
        [frame]
            begin=-350
            end=-100
            image="units/monsters/rabid-hound-attack1.png"
            sound={SOUND_LIST:WOLF_GROWL}
        [/frame]
        [if]
            hits=no
            [frame]
                begin=-100
                end=0
                image="units/monsters/rabid-hound-attack2.png"
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                begin=-100
                end=0
                image="units/monsters/rabid-hound-attack2.png"
                sound=bite.ogg
            [/frame]
        [/else]
        [frame]
            begin=0
            end=250
            image="units/monsters/rabid-hound-attack1.png"
        [/frame]
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Hellhound
    name= _ "Hellhound"
    race=monster
    image="units/monsters/hellhound.png"
    [movement_anim]
        [frame]
            begin=0
            end=150
            image="units/monsters/hellhound.png"
        [/frame]
    [/movement_anim]
    hitpoints=47
    movement_type=houndfoot
    movement=7
    experience=150
    level=3
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=74
    usage=fighter
    undead_variation=saurian
    description= _ "These creatures are no longer the loyal companions of demonic assault parties. They turn into their leaders by the dread they inspire into other followers of Chaos, and the intelligence they have developed as heartless half-demons. Because it is not common for these hounds to acquire enough experience to evolve this further, as their frantic attacks usually harms them to death. Thus, at this point they are respected and treated as heroes by their comrades."
    die_sound={SOUND_LIST:WOLF_DIE}
    {DEFENSE_ANIM "units/monsters/hellhound.png" "units/monsters/hellhound.png" {SOUND_LIST:WOLF_HIT} }
    [attack]
        name=fangs
        description= _ "fangs"
        icon=attacks/fangs-animal.png
        type=blade
        range=melee
        [specials]
            {WEAPON_SPECIAL_BERSERK}
        [/specials]
        damage=8
        number=4
    [/attack]
    [attack_anim]
        [filter_attack]
            name=fangs
        [/filter_attack]
        offset=0.0~-0.1:100,-0.1~0.0:50,0.0~0.3:50,0.3~0.5:100,0.5~0.6:50,0.6~0.4:100,0.4~0.2:50,0.2~0.0:100
        [frame]
            begin=-350
            end=-100
            image="units/monsters/hellhound.png"
            sound={SOUND_LIST:WOLF_GROWL}
        [/frame]
        [if]
            hits=no
            [frame]
                begin=-100
                end=0
                image="units/monsters/hellhound.png"
            [/frame]
        [/if]
        [else]
            hits=yes
            [frame]
                begin=-100
                end=0
                image="units/monsters/hellhound.png"
                sound=bite.ogg
            [/frame]
        [/else]
        [frame]
            begin=0
            end=250
            image="units/monsters/hellhound.png"
        [/frame]
    [/attack_anim]
[/unit_type]


#textdomain wesnoth-Genesis

#define MISSILE_FRAME_INFERNAL_CHILL
    [missile_frame]
        begin=-150
        end=0
        image="projectiles/whitemissile-n.png"
        image_diagonal="projectiles/whitemissile-ne.png"
    [/missile_frame]
#enddef

#define MISSILE_FRAME_SLIME
    [missile_frame]
        begin=-150
        end=0
        image="projectiles/slime-glob.png"
        image_diagonal="projectiles/slime-glob.png"
    [/missile_frame]
#enddef

#define MELEE_FRAME_FIRE_AURA _MELEE_FRAME _BASE_FRAME
    start_time=-150
    [if]
        hits=no
        [frame]
            duration=50
            image={_BASE_FRAME}
        [/frame]
        [frame]
            duration=200
            image={_MELEE_FRAME}
            sound={SOUND_LIST:MISS}
        [/frame]
        [frame]
            duration=200
            image={_BASE_FRAME}
        [/frame]
    [/if]
    [else]
        hits=yes
        [frame]
            duration=50
            halo=projectiles/fire-burst-small-1.png
            image={_BASE_FRAME}
            sound=fire.wav
        [/frame]
        [frame]
            halo="projectiles/fire-burst-small-[1~4].png:50"
            image={_MELEE_FRAME}
        [/frame]
        [frame]
            halo="projectiles/fire-burst-small-[5~8].png:50"
            image={_BASE_FRAME}
        [/frame]
    [/else]
#enddef

#define BURST_FRAME_FAERIE_MYSTIC_FIRE
    burst_start_time=0
    burst_offset=0.8~1.0

    [burst_frame][/burst_frame]
    [burst_frame]
        image="projectiles/fire-burst-small-[1~8].png:75"
    [/burst_frame]
#enddef

#define MISSILE_FRAME_FAERIE_MYSTIC_FIRE
    specialfx_auto_vflip=false
    specialfx_start_time=-331

    [specialfx_frame]
        halo="halo/saurian-magic-halo-[1~7].png:50"
    [/specialfx_frame]

    {MISSILE_FRAME_FIRE_BREATH 12,-39 12,19 25,-26 27,19}
#enddef

#define FLAME_BLAST_FRAME _NUM _START_TIME _X _Y
    flame_blast_{_NUM}_start_time={_START_TIME}
    flame_blast_{_NUM}_auto_vflip=no
    flame_blast_{_NUM}_offset=1.0
    [flame_blast_{_NUM}_frame]
        halo="halo/flame-burst-[1~8].png:50"
        halo_x={_X}
        halo_y={_Y}
    [/flame_blast_{_NUM}_frame]
#enddef

#define FLAME_BLAST_ANIMATION
    offset=0.0

    flame_sound_start_time=-400
    [flame_sound_frame]
        duration=100
        sound=fire.wav
    [/flame_sound_frame]

    {FLAME_BLAST_FRAME 1 -400 -22   0}

    {FLAME_BLAST_FRAME 2 -350 -14   9}

    {FLAME_BLAST_FRAME 3 -300   0  12}

    {FLAME_BLAST_FRAME 4 -250  14   9}

    {FLAME_BLAST_FRAME 5 -200  22   0}
#enddef

#define FLAME_BLAST_AFFECTS_SELF
    flame_blast_1_offset=0.0
    flame_blast_2_offset=0.0
    flame_blast_3_offset=0.0
    flame_blast_4_offset=0.0
    flame_blast_5_offset=0.0
#enddef

#define NOCTUM_BEAM_ANIMATION
    offset=0.0

    beam_auto_vflip=no
    beam_start_time=-400
    beam_offset=1.0
    beam_halo_y=20

    beam_halo_mod="~O(0.8)"

    [beam_frame]
        halo="halo/darkness-beam-[1~7,6~1].png:[30*6,130,70*6]"
    [/beam_frame]
#enddef

#define NOCTUM_FIRE_ANIMATION
    {FLAME_BLAST_ANIMATION}

    flame_blast_1_halo_mod="~B(120)"
    flame_blast_2_halo_mod="~B(120)"
    flame_blast_3_halo_mod="~B(120)"
    flame_blast_4_halo_mod="~B(120)"
    flame_blast_5_halo_mod="~B(120)"
#enddef

#define NOCTUM_BOLT_ANIMATION _N1 _N2
    bolt1_auto_vflip=no
    bolt1_start_time=-175
    bolt1_offset=1.0
    bolt1_halo_y=-125
    bolt1_halo_mod="~R(120)"

    [bolt1_frame]
        halo="halo/lightning-bolt-"+{_N1}+"-3.png:100,halo/lightning-bolt-"+{_N1}+"-4.png:100"
    [/bolt1_frame]

    bolt2_auto_vflip=no
    bolt2_start_time=-100
    bolt2_offset=1.0
    bolt2_halo_y=-125
    bolt2_halo_mod="~R(120)"

    [bolt2_frame]
        halo="halo/lightning-bolt-"+{_N2}+"-4.png:100,halo/lightning-bolt-"+{_N2}+"-4.png~O(0.5):100"
    [/bolt2_frame]

    {SOUND:HIT_AND_MISS lightning.ogg lightning-miss.ogg -175}
#enddef

#define BLOOD_BOLT_ANIMATION _N1 _N2
    {NOCTUM_BOLT_ANIMATION ({_N1}) ({_N2})}

    #bolt1_halo_mod="~CS(120,-64,-64)" purple
    #bolt2_halo_mod="~CS(120,-64,-64)" purple

    bolt1_halo_mod="~CS(255,-32,-32)"
    bolt2_halo_mod="~CS(255,-32,-32)"
#enddef

#define GUARDIAN_DEFENSE_ANIM R G B REACTION_IMAGE BASE_IMAGE HIT_SOUND
    [defend]
        start_time=-175
        [frame]
            duration=25
            image={BASE_IMAGE}
            halo="halo/guardian-defense-halo.png"
            halo_mod="~CS({R},{G},{B})~O(0.2)"
        [/frame]
        [frame]
            duration=25
            image={BASE_IMAGE}
            halo="halo/guardian-defense-halo.png"
            halo_mod="~CS({R},{G},{B})~O(0.4)"
        [/frame]
        [frame]
            duration=50
            image={REACTION_IMAGE}
            halo="halo/guardian-defense-halo.png"
            halo_mod="~CS({R},{G},{B})~O(0.6)"
        [/frame]
        [frame]
            duration=50
            image={REACTION_IMAGE}
            halo="halo/guardian-defense-halo.png"
            halo_mod="~CS({R},{G},{B})~O(0.8)"
        [/frame]
        [if]
            hits=hit
            [frame]
                duration=100
                image={REACTION_IMAGE}
                sound={HIT_SOUND}
                halo="halo/guardian-defense-halo.png"
                halo_mod="~CS({R},{G},{B})"
            [/frame]
        [/if]
        [else]
            hits=miss,kill
            [frame]
                duration=100
                image={REACTION_IMAGE}
                halo="halo/guardian-defense-halo.png"
                halo_mod="~CS({R},{G},{B})"
            [/frame]
        [/else]
        [frame]
            duration=50
            image={REACTION_IMAGE}
            halo="halo/guardian-defense-halo.png"
            halo_mod="~CS({R},{G},{B})~O(0.8)"
        [/frame]
        [frame]
            duration=25
            image={BASE_IMAGE}
            halo="halo/guardian-defense-halo.png"
            halo_mod="~CS({R},{G},{B})~O(0.6)"
        [/frame]
        [frame]
            duration=25
            image={BASE_IMAGE}
            halo="halo/guardian-defense-halo.png"
            halo_mod="~CS({R},{G},{B})~O(0.4)"
        [/frame]
        [frame]
            duration=25
            image={BASE_IMAGE}
            halo="halo/guardian-defense-halo.png"
            halo_mod="~CS({R},{G},{B})~O(0.2)"
        [/frame]
    [/defend]
#enddef


#textdomain wesnoth-Genesis

#define ABILITY_FAUX_VISAGE
    [dummy]
        id=faux_visage
        name= _ "faux visage"
        description= _"This unit sometimes takes on the form of a different unit."
    [/dummy]
#enddef

#define WEAPON_SPECIAL_OBLIVION
    [dummy]
        id=abeyance
        name= _ "oblivion"
        name_inactive= _ "oblivion"
        description= _ "This attack will deal 10 bonus damage that ignores all resists."
        description_inactive= _ "This attack will deal 10 bonus damage that ignores all resists."
    [/dummy]
#enddef

#define ABILITY_GNS_INVISIBILITY
    [hides]
        id=invisibility
        name= _ "invisibility"
        female_name= _ "invisibility"
        description= _ "The unit is invisible.

Enemy units cannot see this unit, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
        name_inactive= _ "invisibility"
        female_name_inactive= _ "female^invisibility"
        description_inactive= _ "The unit is invisible.

Enemy units cannot see this unit, except if they have units next to it. Any enemy unit that first discovers this unit immediately loses all its remaining movement."
        affect_self=yes
    [/hides]
#enddef

#define WEAPON_SPECIAL_ABEYANCE2
    [dummy]
        id=abeyance
        name= _ "abeyance"
        name_inactive= _ "abeyance"
        description= _ "This attack does 3 damage that ignores all resists."
        description_inactive= _ "This attack does 3 damage that ignores all resists."
    [/dummy]
#enddef

#define WEAPON_SPECIAL_ABYSS
    [dummy]
        id=abeyance
        name= _ "abyss"
        name_inactive= _ "abyss"
        description= _ "This attack will deal 15 bonus damage that ignores all resists."
        description_inactive= _ "This attack will deal 15 bonus damage that ignores all resists."
    [/dummy]
#enddef

#define ABILITY_TERROR_LEVEL_2
    [leadership]
        id=terror
        value=-45
        cumulative=no
        name= _ "terror"
        description= _ "This unit can frighten enemy units that are next to it, making them fight worse.

Adjacent enemy units of the same or lower level will do less damage in battle. When an enemy unit of the same or lower level is adjacent and engages in combat, its attacks do 15% less damage times the difference in their levels + 15%."
        affect_self=no
        affect_allies=no
        affect_enemies=yes
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
            [filter]
                level=0
            [/filter]
        [/affect_adjacent]
    [/leadership]
    [leadership]
        id=terror
        value=-30
        cumulative=no
        affect_self=no
        affect_allies=no
        affect_enemies=yes
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
            [filter]
                level=1
            [/filter]
        [/affect_adjacent]
    [/leadership]
    [leadership]
        id=terror
        value=-15
        cumulative=no
        affect_self=no
        affect_allies=no
        affect_enemies=yes
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
            [filter]
                level=2
            [/filter]
        [/affect_adjacent]
    [/leadership]
#enddef

#define ABILITY_TERROR_LEVEL_3
    [leadership]
        id=terror
        value=-60
        cumulative=no
        name= _ "terror"
        description= _ "This unit can frighten enemy units that are next to it, making them fight worse.

Adjacent enemy units of the same or lower level will do less damage in battle. When an enemy unit of the same or lower level is adjacent and engages in combat, its attacks do 15% less damage times the difference in their levels + 15%."
        affect_self=no
        affect_allies=no
        affect_enemies=yes
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
            [filter]
                level=0
            [/filter]
        [/affect_adjacent]
    [/leadership]
    [leadership]
        id=terror
        value=-45
        cumulative=no
        affect_self=no
        affect_allies=no
        affect_enemies=yes
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
            [filter]
                level=1
            [/filter]
        [/affect_adjacent]
    [/leadership]
    [leadership]
        id=terror
        value=-30
        cumulative=no
        affect_self=no
        affect_allies=no
        affect_enemies=yes
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
            [filter]
                level=2
            [/filter]
        [/affect_adjacent]
    [/leadership]
    [leadership]
        id=terror
        value=-15
        cumulative=no
        affect_self=no
        affect_allies=no
        affect_enemies=yes
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
            [filter]
                level=3
            [/filter]
        [/affect_adjacent]
    [/leadership]
#enddef
#define ABILITY_INCORPOREAL
    [dummy]
        id=gns_incorporeal
        name= _ "incorporeal"
        female_name= _ "female^incorporeal"
        description= _ "This unit will not take damage from physical attacks, except for blows that will kill it."
    [/dummy]
#enddef
#define ABILITY_DECOMPOSITION
    [dummy]
        id=decomposition
        name= _ "decomposition"
        female_name= _ "female^decomposition"
        description= _ "This unit will reduce the hitpoints of nearby enemies in half (within a radius of 4) on each new turn."
    [/dummy]
#enddef

#define GNS_INCORPOREAL TYPE
    [event]
        name=attacker hits
        first_time_only=no
        [filter_attack]
            type=impact
            [or]
                type=pierce
            [/or]
            [or]
                type=blade
            [/or]
        [/filter_attack]
        [filter_second]
            type={TYPE}
            ability=gns_incorporeal
        [/filter_second]
        [if]
            [variable]
                name=second_unit.hitpoints
                greater_than=1
            [/variable]
            [then]
                [heal_unit]
                    [filter]
                        x,y=$x2,$y2
                    [/filter]
                    amount=$damage_inflicted
                    animate=yes
                    restore_statuses=no
                [/heal_unit]
            [/then]
        [/if]
    [/event]
    [event]
        name=defender hits
        first_time_only=no
        [filter_second_attack]
            type=impact
            [or]
                type=pierce
            [/or]
            [or]
                type=blade
            [/or]
        [/filter_second_attack]
        [filter]
            type={TYPE}
            ability=gns_incorporeal
        [/filter]
        [if]
            [variable]
                name=unit.hitpoints
                greater_than=1
            [/variable]
            [then]
                [heal_unit]
                    [filter]
                        x,y=$x1,$y1
                    [/filter]
                    amount=$damage_inflicted
                    animate=yes
                    restore_statuses=no
                [/heal_unit]
            [/then]
        [/if]
    [/event]
#enddef

#define ABILITY_ETHEREAL
    [dummy]
        id=gns_ethereal
        name= _ "ethereal"
        female_name= _ "female^ethereal"
        description= _ "This unit will not take damage from arcane or fire attacks, except for those that will kill it."
    [/dummy]
#enddef
#define ETHEREAL TYPE
    [event]
        name=attacker hits
        first_time_only=no
        [filter_attack]
            type=fire
            [or]
                type=arcane
            [/or]
        [/filter_attack]
        [filter_second]
            type={TYPE}
            ability=gns_ethereal
        [/filter_second]
        [if]
            [variable]
                name=second_unit.hitpoints
                greater_than=1
            [/variable]
            [then]
                [heal_unit]
                    [filter]
                        x,y=$x2,$y2
                    [/filter]
                    amount=$damage_inflicted
                    animate=yes
                    restore_statuses=no
                [/heal_unit]
            [/then]
        [/if]
    [/event]
    [event]
        name=defender hits
        first_time_only=no
        [filter_second_attack]
            type=fire
            [or]
                type=arcane
            [/or]
        [/filter_second_attack]
        [filter]
            type={TYPE}
            ability=gns_ethereal
        [/filter]
        [if]
            [variable]
                name=unit.hitpoints
                greater_than=1
            [/variable]
            [then]
                [heal_unit]
                    [filter]
                        x,y=$x1,$y1
                    [/filter]
                    amount=$damage_inflicted
                    animate=yes
                    restore_statuses=no
                [/heal_unit]
            [/then]
        [/if]
    [/event]
#enddef

#define WEAPON_SPECIAL_TRUE_STRIKE
    [chance_to_hit]
        id=truestrike
        name= _ "true strike"
        description= _ "This attack always hits."
        value=100
        cumulative=no
    [/chance_to_hit]
#enddef

#define WEAPON_SPECIAL_COUNTERSTRIKE
    [attacks]
        id=counterstrike
        name= _ "counterstrike"
        description= _ "The opponent has a 0% chance to hit when this attack is used offensively."
        value=0
        cumulative=no
        apply_to=opponent
        active_on=offense
    [/attacks]
#enddef
#define WEAPON_SPECIAL_TERROR
    [damage]
        id=terror
        name= _ "terror"
        name_inactive= _ "terror"
        description= _ "Enemies deal half damage when this attack is used."
        description_inactive= _ "Enemies deal half damage when this attack is used."
        apply_to=opponent
        multiply=0.5
    [/damage]
#enddef

#define WEAPON_SPECIAL_SPELLBIND1
    [damage]
        id=spellbind1
        name= _ "spell bind"
        name_inactive= _ "spell bind"
        description= _ "When this attack is used, all spell damage taken will be reduced by 70%."
        description_inactive= _ "When this attack is used, all spell damage taken will be reduced by 70%."
        [filter_opponent]
            [filter_weapon]
                type=fire,cold,arcane
            [/filter_weapon]
        [/filter_opponent]
        apply_to=opponent
        multiply=0.3
    [/damage]
#enddef

#define ABILITY_ENERVATE20
    [leadership]
        id=enervate20
        value=-20
        cumulative=no
        name= _ "enervate"
        female_name= _ "female^enervate"
        description= _ "This unit reduces the damage of nearby enemies by 20%."
        affect_self=no
        affect_allies=no
        affect_enemies=yes
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
        [/affect_adjacent]
    [/leadership]
#enddef

#define ABILITY_ENERVATE40
    [leadership]
        id=enervate40
        value=-40
        cumulative=no
        name= _ "enervate"
        female_name= _ "female^enervate"
        description= _ "This unit reduces the damage of nearby enemies by 40%."
        affect_self=no
        affect_allies=no
        affect_enemies=yes
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
        [/affect_adjacent]
    [/leadership]
#enddef
#define WEAPON_SPECIAL_SCORCHED_EARTH
    [dummy]
        id=scorched_earth
        name= _ "scorched earth"
        name_inactive= _ "scorched earth"
        description= _ "On attack, this weapon burns the nearby ground that it strikes. Units that stand on patches of earth that have been struck within the last 10 turns are dealt 3 damage (stacking) upon turn refresh."
        description_inactive= _ "On attack, this weapon burns the nearby ground that it strikes. Units that stand on patches of earth that have been struck within the last 10 turns are dealt 3 damage (stacking) upon turn refresh."
    [/dummy]
#enddef
#define SCORCHED_EARTH TURNS DMG
    [event]
        name=attacker_hits
        first_time_only=no
        [filter_attack]
            special_id=scorched_earth
        [/filter_attack]
        [store_unit]
            [filter]
                x,y=$x2,$y2
            [/filter]
            variable=opp
        [/store_unit]
        {PLAY_SOUND "flame-big.ogg"}
        [terrain]
            x,y=$x2,$y2
            radius=1
            terrain=Rd
        [/terrain]
        [item]
            x,y=$x2,$y2
            radius=1
            image=misc/blank-hex.png~NOP()~NOP()~NOP()~NOP()
            halo=scenery/flames[01~15].png:120
        [/item]
        [set_variables]
            name=searthloc
            mode=append
            [value]
                x=$x2
                y=$y2
                turn_num=0
            [/value]
        [/set_variables]
        {CLEAR_VARIABLE opp}
    [/event]
    [event]
        name=new turn
        first_time_only=no
        {VARIABLE sedmg {DMG}}
        {VARIABLE endturn {TURNS}}
        {VARIABLE_OP endturn add 1}
        [for]
            array=searthloc
            [do]
                {VARIABLE_OP searthloc[$i].turn_num add 1}
                [if]
                    [have_unit]
                        x,y=$searthloc[$i].x,$searthloc[$i].y
                        [or]
                            [filter_location]
                                [filter_adjacent_location]
                                    x,y=$searthloc[$i].x,$searthloc[$i].y
                                [/filter_adjacent_location]
                            [/filter_location]
                        [/or]
                    [/have_unit]
                    [and]
                        [variable]
                            name=searthloc[$i].turn_num
                            less_than_equal={TURNS}
                        [/variable]
                    [/and]
                    [then]
                        {PLAY_SOUND "flame-big.ogg"}
                        [harm_unit]
                            [filter]
                                x,y=$searthloc[$i].x,$searthloc[$i].y
                                [or]
                                    [filter_location]
                                        [filter_adjacent_location]
                                            x,y=$searthloc[$i].x,$searthloc[$i].y
                                        [/filter_adjacent_location]
                                    [/filter_location]
                                [/or]
                            [/filter]
                            fire_event=yes
                            animate=yes
                            type=fire
                            amount=$sedmg
                            delay=100
                        [/harm_unit]
                    [/then]
                [/if]
                [if]
                    [variable]
                        name=searthloc[$i].turn_num
                        numerical_equals=$endturn
                    [/variable]
                    [then]
                        [remove_item]
                            x,y=$searthloc[$i].x,$searthloc[$i].y
                            radius=1
                            image=misc/blank-hex.png~NOP()~NOP()~NOP()~NOP()
                        [/remove_item]
                    [/then]
                [/if]
            [/do]
        [/for]
        {CLEAR_VARIABLE sedmg}
    [/event]
    [event]
        name=victory
        first_time_only=no
        {CLEAR_VARIABLE searthloc}
    [/event]
#enddef
#define ABILITY_BLITZ
    [dummy]
        id=blitz
        name= _ "blitz"
        description= _"This unit can attack three times in one turn."
    [/dummy]
#enddef

#define BLITZ
    [event]
        name=new turn
        first_time_only=no
        [if]
            [have_unit]
                ability=blitz
            [/have_unit]
            [then]
                [modify_unit]
                    [filter]
                        ability=blitz
                    [/filter]
                    max_attacks=3
                    attacks_left=3
                [/modify_unit]
            [/then]
        [/if]
    [/event]
    [event]
        name=attack_end
        first_time_only=no
        [filter]
            ability=blitz
            x,y=$x1,$y1
        [/filter]
        [if]
            [have_unit]
                ability=blitz
                x,y=$x1,$y1
            [/have_unit]
            [then]
                [modify_unit]
                    [filter]
                        ability=blitz
                        x,y=$x1,$y1
                    [/filter]
                    moves=5
                [/modify_unit]
            [/then]
        [/if]
    [/event]
#enddef

#define WEAPON_SPECIAL_BLAZE
    [damage]
        id=blaze
        name= _ "blaze"
        description= _ "When used offensively, this attack gains 25% damage."
        multiply=1.25
        active_on=offense
    [/damage]
#enddef

#define ABILITY_DEVOUR
    [dummy]
        id=essence_devouring
        name= _ "devour"
        name_inactive= _ "devour"
        description= _ "This unit deals 3 damage to nearby enemies on each new turn and heals for half the damage dealt."
        description_inactive= _ "This unit deals 3 damage to nearby enemies on each new turn and heals for half the damage dealt."
    [/dummy]
#enddef

#define ESSENCE_DEVOURING
    [event]
        name=new turn
        first_time_only=no

        [store_unit]
            [filter]
                [filter_adjacent]
                    ability=essence_devouring
                    is_enemy=yes
                [/filter_adjacent]
            [/filter]
            variable=opp
        [/store_unit]
        [store_unit]
            [filter]
                ability=essence_devouring
            [/filter]
            variable=unit
        [/store_unit]
        {VARIABLE counter 0}
        [for]
            array=opp
            [do]
                {VARIABLE_OP counter add 1}
            [/do]
        [/for]
        [for]
            array=opp
            [do]
                [harm_unit]
                    [filter]
                        x,y=$opp[$i].x,$opp[$i].y
                    [/filter]
                    fire_event=yes
                    animate=yes
                    amount=3
                    delay=25
                [/harm_unit]
                [if]
                    [have_unit]
                        x,y=$opp[$i].x,$opp[$i].y
                    [/have_unit]
                    [else]
                        {VARIABLE exp $opp[$i].level}
                        {VARIABLE_OP exp multiply 8}
                        {VARIABLE_OP unit.experience add $exp}
                        {CLEAR_VARIABLE exp}
                        [unstore_unit]
                            variable=unit
                            find_vacant=no
                        [/unstore_unit]
                    [/else]
                [/if]
            [/do]
        [/for]
        {VARIABLE_OP counter multiply 1.5}
        [heal_unit]
            [filter]
                ability=essence_devouring
            [/filter]
            amount=$counter
            animate=yes
        [/heal_unit]
        {CLEAR_VARIABLE opp}
        {CLEAR_VARIABLE unit}
        {CLEAR_VARIABLE counter}
    [/event]
#enddef

#define WEAPON_SPECIAL_DRAIN100
    [drains]
        id=drain100
        value=100
        name= _ "vitiate"
        description= _ "This attack saps the life force of the enemies it harms."
    [/drains]
#enddef

#define WEAPON_SPECIAL_CHAOS
    [chance_to_hit]
        id=chaos
        name= _ "chaos"
        description= _ "This attack has at least a 70% chance to hit at night."
        affect_self=yes
        [filter_self]
            [filter_location]
                time_of_day=chaotic
            [/filter_location]
        [/filter_self]
        value=70
        cumulative=yes
    [/chance_to_hit]
#enddef

#define WEAPON_SPECIAL_ABEYANCE
    [dummy]
        id=abeyance
        name= _ "abeyance"
        name_inactive= _ "abeyance"
        description= _ "This attack does 5 damage that ignores all resists."
        description_inactive= _ "This attack does 5 damage that ignores all resists."
    [/dummy]
#enddef
#define ABEYANCE WEAPON DMG
    [event]
        name=attacker_hits
        first_time_only=no
        [filter_attack]
            name={WEAPON}
            special_id=abeyance
        [/filter_attack]
        [store_unit]
            [filter]
                x,y=$x2,$y2
            [/filter]
            variable=opp
        [/store_unit]
        {VARIABLE obliterate {DMG}}
        [harm_unit]
            [filter]
                x,y=$x2,$y2
            [/filter]
            fire_event=yes
            animate=yes
            amount=$obliterate
            delay=50
        [/harm_unit]
        [if]
            [have_unit]
                x,y=$x2,$y2
            [/have_unit]
            [then][/then]
            [else]
                {VARIABLE exp $opp.level}
                {VARIABLE_OP exp multiply 8}
                {VARIABLE_OP unit.experience add "$(max(4, $exp))"}
                {CLEAR_VARIABLE exp}
                [unstore_unit]
                    variable=unit
                    find_vacant=no
                [/unstore_unit]
            [/else]
        [/if]
        {CLEAR_VARIABLE opp}
        {CLEAR_VARIABLE obliterate}
    [/event]
    [event]
        name=defender hits
        first_time_only=no
        [filter_second_attack]
            name={WEAPON}
            special_id=abeyance
        [/filter_second_attack]
        [store_unit]
            [filter]
                x,y=$x1,$y1
            [/filter]
            variable=opp
        [/store_unit]
        {VARIABLE obliterate {DMG}}
        [harm_unit]
            [filter]
                x,y=$x1,$y1
            [/filter]
            fire_event=yes
            animate=yes
            amount=$obliterate
            delay=50
        [/harm_unit]
        [if]
            [have_unit]
                x,y=$x1,$y1
            [/have_unit]
            [then][/then]
            [else]
                {VARIABLE exp $opp.level}
                {VARIABLE_OP exp multiply 8}
                {VARIABLE_OP second_unit.experience add "$(max(4, $exp))"}
                {CLEAR_VARIABLE exp}
                [unstore_unit]
                    variable=second_unit
                    find_vacant=no
                [/unstore_unit]
            [/else]
        [/if]
        {CLEAR_VARIABLE opp}
        {CLEAR_VARIABLE obliterate}
    [/event]
#enddef