#textdomain wesnoth-Genesis

#define ABILITY_IRON_BLOOD
    [resistance]
        id=iron_blood
        apply_to=blade,impact,pierce
        add=20
        max_value=90
        name= _ "iron blood"
        female_name= _ "female^iron blood"
        description= _ "This unit’s physical resistances are increased by 20% when defending."
        affect_self=yes
        active_on=defense
    [/resistance]
#enddef

#define ABILITY_INFUSE_HEALING3
    [heals]
        value=3
        id=healing
        affect_allies=yes
        name= _ "infuse"
        female_name= _ "female^infuse"
        description= _ "A unit cared for by this healer may heal up to 3 HP per turn or be cured of poison."
        affect_self=yes
        poison=cured
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
        [/affect_adjacent]
    [/heals]
#enddef

#define ABILITY_INFUSE_HEALING6
    [heals]
        value=6
        id=healing
        affect_allies=yes
        name= _ "infuse"
        female_name= _ "female^infuse"
        description= _ "A unit cared for by this healer may heal up to 6 HP per turn or be cured of poison."
        affect_self=yes
        poison=cured
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
        [/affect_adjacent]
    [/heals]
#enddef

#define ABILITY_INFUSE_HEALING9
    [heals]
        value=9
        id=healing
        affect_allies=yes
        name= _ "infuse"
        female_name= _ "female^infuse"
        description= _ "A unit cared for by this healer may heal up to 9 HP per turn or be cured of poison."
        affect_self=yes
        poison=cured
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
        [/affect_adjacent]
    [/heals]
#enddef

#define ABILITY_INFUSE3
    {ABILITY_UNPOISON}
    {ABILITY_INFUSE_HEALING3}
#enddef

#define ABILITY_INFUSE6
    {ABILITY_UNPOISON}
    {ABILITY_INFUSE_HEALING6}
#enddef

#define ABILITY_INFUSE9
    {ABILITY_UNPOISON}
    {ABILITY_INFUSE_HEALING9}
#enddef

#define WEAPON_SPECIAL_SOUL_SIPHON
    [dummy]
        id=soul_siphon
        name= _ "reap"
        name_inactive= _ "reap"
        description= _ "A portion of the damage dealt by this attack is converted into healing energy and spread among nearby allies."
        description_inactive= _ "A portion of the damage dealt by this attack is converted into healing energy and spread among nearby allies."
    [/dummy]
#enddef

#define SOUL_SIPHON WEAPON FACTOR
    [event]
        name=attacker_hits
        first_time_only=no
        [filter_attack]
            name={WEAPON}
            special=soul_siphon
        [/filter_attack]
        [store_unit]
            [filter]
                [filter_adjacent]
                    x,y=$x1,$y1
                    is_enemy=no
                [/filter_adjacent]
                [not]
                    x,y=$x2,$y2
                [/not]
            [/filter]
            variable=ally
        [/store_unit]
        {VARIABLE counter 0}
        {VARIABLE heal_health $damage_inflicted}
        {VARIABLE_OP heal_health divide {FACTOR}}
        {FOREACH ally i}
            {VARIABLE_OP counter add 1}
        {NEXT i}
        [if]
            [variable]
                name=counter
                greater_than=0
            [/variable]
            [then]
                {VARIABLE_OP heal_health divide $counter}
            [/then]
        [/if]
        {FOREACH ally i}
            [heal_unit]
                [filter]
                    x,y=$ally[$i].x,$ally[$i].y
                [/filter]
                amount=$heal_health
                animate=yes
                restore_statuses=no
            [/heal_unit]
        {NEXT i}
        {CLEAR_VARIABLE heal_health}
        {CLEAR_VARIABLE counter}
        {CLEAR_VARIABLE ally}
    [/event]
    [event]
        name=defender hits
        first_time_only=no
        [filter_second_attack]
            special=soul_siphon
        [/filter_second_attack]
        [store_unit]
            [filter]
                [filter_adjacent]
                    x,y=$x2,$y2
                    is_enemy=no
                [/filter_adjacent]
                [not]
                    x,y=$x1,$y1
                [/not]
            [/filter]
            variable=ally
        [/store_unit]
        {VARIABLE counter 0}
        {VARIABLE heal_health $damage_inflicted}
        {VARIABLE_OP heal_health divide {FACTOR}}
        {FOREACH ally i}
            {VARIABLE_OP counter add 1}
        {NEXT i}
        [if]
            [variable]
                name=counter
                greater_than=0
            [/variable]
            [then]
                {VARIABLE_OP heal_health divide $counter}
            [/then]
        [/if]
        {FOREACH ally i}
            [heal_unit]
                [filter]
                    x,y=$ally[$i].x,$ally[$i].y
                [/filter]
                amount=$heal_health
                animate=yes
                restore_statuses=no
            [/heal_unit]
        {NEXT i}
        {CLEAR_VARIABLE heal_health}
        {CLEAR_VARIABLE counter}
        {CLEAR_VARIABLE ally}
    [/event]
#enddef

#define WEAPON_SPECIAL_MALEFICE
    [dummy]
        id=malefice
        name= _ "malefice"
        description= _ "When this attack kills a unit (level 3 and above), it gains 1 damage. Does not work against Undead and Demons."
    [/dummy]
#enddef

#define MALEFICE
    [event]
        id=special_malefice_die
        name=die
        first_time_only=no

        [filter]
            level=3
            [not]
                race=undead,demon,elemental,magical
            [/not]
            [or]
                level=4
                [not]
                    race=undead,demon,elemental,magical
                [/not]
            [/or]
            [or]
                level=5
                [not]
                    race=undead,demon,elemental,magical
                [/not]
            [/or]
            [or]
                level=6
                [not]
                    race=undead,demon,elemental,magical
                [/not]
            [/or]
            [or]
                level=7
                [not]
                    race=undead,demon,elemental,magical
                [/not]
            [/or]
            [and]
                [not]
                    race=undead,demon,elemental,magical
                [/not]
            [/and]
        [/filter]

        [filter_second_attack]
            special=malefice
        [/filter_second_attack]

        [store_unit]
            [filter]
                x,y=$x2,$y2
            [/filter]
            [not]
                x,y=$x1,$y1
            [/not]
        [/store_unit]

        [object]
            [filter]
                x,y=$x2,$y2
            [/filter]
            duration=forever
            silent=yes
            [effect]
                apply_to=attack
                special=malefice
                increase_damage=1
            [/effect]
        [/object]
    [/event]
#enddef

#define WEAPON_SPECIAL_AGONY
    [damage]
        id=agony
        name= _ "agony"
        name_inactive= _ "agony"
        description= _ "The immense pain resulting from this attack causes enemies to deal 30% less damage."
        description_inactive= _ "The immense pain resulting from this attack causes enemies to deal 30% less damage."
        apply_to=opponent
        multiply=0.7
    [/damage]
#enddef

#define ABILITY_STRUT
    [dummy]
        id=strut
        name= _ "strut"
        name_inactive= _ "strut"
        description= _ "Adjacent undead units gain 2 extra movement points on each new turn."
        description_inactive= _ "Adjacent undead units gain 2 extra movement points on each new turn."
    [/dummy]
#enddef

#define STRUT
    [event]
        name=turn refresh
        first_time_only=no
        [store_unit]
            [filter]
                race=undead
                [filter_adjacent]
                    ability=strut
                    is_enemy=no
                [/filter_adjacent]
            [/filter]
            variable=fast_unit
        [/store_unit]
        [for]
            array=fast_unit
            [do]
                {VARIABLE_OP fast_unit[$i].moves add 2}

                [unstore_unit]
                    variable=fast_unit[$i]
                    find_vacant=no
                [/unstore_unit]
            [/do]
        [/for]
        {CLEAR_VARIABLE fast_unit}
    [/event]
#enddef

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

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

        [store_unit]
            [filter]
                [filter_adjacent]
                    ability=transfusion
                    is_enemy=yes
                [/filter_adjacent]
            [/filter]
            variable=opp
        [/store_unit]
        [store_unit]
            [filter]
                    ability=transfusion
            [/filter]
            variable=unit
        [/store_unit]
        {VARIABLE counter 0}
        {FOREACH opp i}
            {VARIABLE_OP counter add 1}
        {NEXT i}
        {FOREACH opp i}
        [harm_unit]
            [filter]
                x,y=$opp[$i].x,$opp[$i].y
            [/filter]
            fire_event=yes
            animate=yes
            amount=6
            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]
        {NEXT i}
        {VARIABLE_OP counter multiply 6}
        [heal_unit]
            [filter]
                ability=transfusion
            [/filter]
            amount=$counter
            animate=yes
        [/heal_unit]
        {CLEAR_VARIABLE opp}
        {CLEAR_VARIABLE unit}
        {CLEAR_VARIABLE counter}
    [/event]
#enddef

#define ABILITY_IRON_WARDEN
    [dummy]
        id=iron warden
        name= _ "iron warden"
        name_inactive= _ "iron warden"
        description= _ "When nearby allies are attacked by physical attacks, they heal for 30% of the damage dealt and return damage equal to the amount healed."
        description_inactive= _ "When nearby allies are attacked by physical attacks, they heal for 30% of the damage dealt and return damage equal to the amount healed."
    [/dummy]
#enddef

#define IRON_WARDEN FACTOR
    [event]
        name=attacker_hits
        first_time_only=no

        [filter_attack]
            type=blade,impact,pierce
        [/filter_attack]

        [filter_second]
            [filter_adjacent]
                ability=iron warden
                is_enemy=no
            [/filter_adjacent]
        [/filter_second]

        [store_unit]
            [filter]
                x,y=$x2,$y2
                [filter_adjacent]
                    ability=iron warden
                    is_enemy=no
                [/filter_adjacent]
            [/filter]
            variable=shielded
        [/store_unit]
        [store_unit]
            [filter]
                x,y=$x1,$y1
            [/filter]
            variable=opp
        [/store_unit]

        {VARIABLE heal_health $damage_inflicted}
        {VARIABLE_OP heal_health divide {FACTOR}}
        [if]
            [variable]
                name=second_unit.hitpoints
                greater_than=0
            [/variable]
            [then]
                {FOREACH shielded i}
                    [heal_unit]
                        [filter]
                            x,y=$shielded[$i].x,$shielded[$i].y
                        [/filter]
                        amount=$heal_health
                        animate=yes
                        restore_statuses=no
                    [/heal_unit]
                {NEXT i}

                [harm_unit]
                    [filter]
                        x,y=$x1,$y1
                    [/filter]
                    amount=$heal_health
                    animate=yes
                    fire_event=yes
                [/harm_unit]
            [/then]
        [/if]

        [if]
            [have_unit]
                x,y=$x1,$y1
            [/have_unit]
            [else]
                {VARIABLE exp $opp.level}
                {VARIABLE_OP exp multiply 8}
                {VARIABLE_OP second_unit.experience add $exp}
                {CLEAR_VARIABLE exp}
                [unstore_unit]
                    variable=second_unit
                    find_vacant=no
                [/unstore_unit]
            [/else]
        [/if]

        {CLEAR_VARIABLE opp}
        {CLEAR_VARIABLE heal_health}
        {CLEAR_VARIABLE shielded}
    [/event]
#enddef

#define WEAPON_SPECIAL_MORTAL_MASQUE
    [swarm]
        id=mortal_masque
        name= _ "mortal masque"
        description= _ "This attack gains up to 9 strikes when this unit is wounded."
        swarm_attacks_min=9
    [/swarm]
#enddef


#textdomain wesnoth-Genesis

#define IMMOLATE
    [event]
        name=attacker_hits
        first_time_only=no
        [filter_attack]
            special=immolate
        [/filter_attack]
        [store_unit]
            [filter]
                [filter_adjacent]
                    x,y=$x1,$y1
                    is_enemy=yes
                [/filter_adjacent]
                [not]
                    x,y=$x2,$y2
                [/not]
            [/filter]
            variable=opp
        [/store_unit]
        {FOREACH opp i}
        [harm_unit]
            [filter]
                x,y=$opp[$i].x,$opp[$i].y
            [/filter]
            fire_event=yes
            animate=yes
            amount=$damage_inflicted
            damage_type=fire
            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 "$(max(4, $exp))"}
                {CLEAR_VARIABLE exp}
                [unstore_unit]
                    variable=unit
                    find_vacant=no
                [/unstore_unit]
            [/else]
        [/if]
        {NEXT i}
        {CLEAR_VARIABLE opp}
    [/event]
#enddef
#define WEAPON_SPECIAL_IMMOLATE
    [dummy]
        id=immolate
        name= _ "immolate"
        name_inactive= _ "immolate"
        description= _ "The damage inflicted by this attack will spread to all nearby enemies."
        description_inactive= _ "The damage inflicted by this attack will spread to all nearby enemies."
    [/dummy]
#enddef
#define WEAPON_SPECIAL_OBLITERATE
    [damage]
        id=obliterate
        name= _ "obliterate"
        description= _ "When used offensively, this attack gains a large amount of damage."
        multiply=2.5
        active_on=offense
    [/damage]
#enddef
#define ABILITY_STORM_SHIELD
    [dummy]
        id=storm_shield
        name= _ "storm shield"
        name_inactive= _ "storm shield"
        description= _ "This unit returns damage when attacked. This damage ignores resistances."
        description_inactive= _ "This unit returns damage when attacked. This damage ignores resistances."
    [/dummy]
#enddef
#define STORM_SHIELD
    [event]
        name=attacker_hits
        first_time_only=no
        [filter_second]
            ability=storm_shield
        [/filter_second]
        [store_unit]
            [filter]
                x,y=$x1,$y1
            [/filter]
            variable=self
        [/store_unit]
        [store_unit]
            [filter]
                x,y=$x2,$y2
            [/filter]
            variable=opp
        [/store_unit]
        {VARIABLE stormshield $damage_inflicted}
        {VARIABLE_OP stormshield multiply 0.67}
        [harm_unit]
            [filter]
                x,y=$x1,$y1
            [/filter]
            fire_event=yes
            animate=yes
            amount=$stormshield
            delay=100
        [/harm_unit]
        [if]
            [have_unit]
                x,y=$x1,$y1
            [/have_unit]
            [else]
                {VARIABLE exp $self.level}
                {VARIABLE_OP exp multiply 8}
                {VARIABLE_OP opp.experience add "$(max(4, $exp))"}
                {CLEAR_VARIABLE exp}
                [unstore_unit]
                    variable=opp
                    find_vacant=no
                [/unstore_unit]
            [/else]
        [/if]
        {CLEAR_VARIABLE opp}
        {CLEAR_VARIABLE self}
        {CLEAR_VARIABLE stormshield}
    [/event]
#enddef
#define ABILITY_FIRE_SHIELD
    [dummy]
        id=fire_shield
        name= _ "fire shield"
        name_inactive= _ "fire shield"
        description= _ "This unit returns fire damage when attacked by melee attacks."
        description_inactive= _ "This unit returns fire damage when attacked by melee attacks."
    [/dummy]
#enddef
#define FIRE_SHIELD
    [event]
        name=attacker_hits
        first_time_only=no
        [filter_second]
            ability=fire_shield
        [/filter_second]
        [store_unit]
            [filter]
                x,y=$x1,$y1
            [/filter]
            variable=self
        [/store_unit]
        [store_unit]
            [filter]
                x,y=$x2,$y2
            [/filter]
            variable=opp
        [/store_unit]
        {VARIABLE fireshield $damage_inflicted}
        {VARIABLE_OP fireshield multiply 0.5}
        [harm_unit]
            [filter]
                x,y=$x1,$y1
            [/filter]
            fire_event=yes
            animate=yes
            amount=$fireshield
            damage_type=fire
            delay=100
        [/harm_unit]
        [if]
            [have_unit]
                x,y=$x1,$y1
            [/have_unit]
            [else]
                {VARIABLE exp $self.level}
                {VARIABLE_OP exp multiply 8}
                {VARIABLE_OP opp.experience add "$(max(4, $exp))"}
                {CLEAR_VARIABLE exp}
                [unstore_unit]
                    variable=opp
                    find_vacant=no
                [/unstore_unit]
            [/else]
        [/if]
        {CLEAR_VARIABLE opp}
        {CLEAR_VARIABLE self}
        {CLEAR_VARIABLE stormshield}
    [/event]
#enddef
#define OBLITERATE WEAPON DMG
    [event]
        id=obliterate handler
        name=attacker_hits
        first_time_only=no
        [filter_attack]
            name={WEAPON}
            special=obliterate
        [/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=100
        [/harm_unit]
        [if]
            [have_unit]
                x,y=$x2,$y2
            [/have_unit]
            [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]
#enddef
#define ABILITY_BLESSING_SHARDIA
    [leadership]
        id=blessing_shardia
        value=10
        cumulative=yes
        name= _ "blessing of shardia"
        female_name= _ "female^blessing of shardia"
        description= _ "This unit gains 10% damage during the day."
        affect_self=yes
        [filter_self]
            [filter_location]
                time_of_day=lawful
            [/filter_location]
        [/filter_self]
    [/leadership]
#enddef
#define ABILITY_KINDLE
    [regenerate]
        value=11
        id=kindle
        name= _ "kindle"
        female_name= _ "female^kindle"
        description= _ "The unit will heal itself 11 HP per turn. If it is poisoned, it will remove the poison instead of healing."
        affect_self=yes
        poison=cured
    [/regenerate]
#enddef
#define ABILITY_HELIOSPHERE
    [resistance]
        id=heliosphere
        name= _ "heliosphere"
        female_name= _ "female^heliosphere"
        description= _ "Nearby allies gain 20% resistance to fire and cold damage."
        affect_self=yes
		affect_allies=yes
        apply_to=fire,cold
        add=20
        max_value=90
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
        [/affect_adjacent]
    [/resistance]
#enddef
#define ABILITY_PYROKINESIS
    [leadership]
        id=pyrokinesis1
        name=
        affect_self=yes
        affect_allies=no
        cumulative=yes
        value=7
		[filter]
			[filter_adjacent]
				adjacent=n,ne,se,s,sw,nw
				count=1
				is_enemy=no
				[has_attack]
				    type=fire
				[/has_attack]
			[/filter_adjacent]
		[/filter]
    [/leadership]
    [leadership]
        id=pyrokinesis2
        name=
        affect_self=yes
        affect_allies=no
        cumulative=yes
        value=14
        [filter]
			[filter_adjacent]
				adjacent=n,ne,se,s,sw,nw
				count=2
				is_enemy=no
				[has_attack]
				    type=fire
				[/has_attack]
			[/filter_adjacent]
		[/filter]
    [/leadership]
    [leadership]
        id=pyrokinesis3
        name=
        affect_self=yes
        affect_allies=no
        cumulative=yes
        value=21
        [filter]
			[filter_adjacent]
				adjacent=n,ne,se,s,sw,nw
				count=3
				is_enemy=no
				[has_attack]
				    type=fire
				[/has_attack]
			[/filter_adjacent]
		[/filter]
    [/leadership]
    [leadership]
        id=pyrokinesis4
        name=
        affect_self=yes
        affect_allies=no
        cumulative=yes
        value=28
        [filter]
			[filter_adjacent]
				adjacent=n,ne,se,s,sw,nw
				count=4
				is_enemy=no
				[has_attack]
				    type=fire
				[/has_attack]
			[/filter_adjacent]
		[/filter]
    [/leadership]
    [leadership]
        id=pyrokinesis5
        name=
        affect_self=yes
        affect_allies=no
        cumulative=yes
        value=35
        [filter]
			[filter_adjacent]
				adjacent=n,ne,se,s,sw,nw
				count=5
				is_enemy=no
				[has_attack]
				    type=fire
				[/has_attack]
			[/filter_adjacent]
		[/filter]
    [/leadership]
    [leadership]
        id=pyrokinesis6
        name=
        affect_self=yes
        affect_allies=no
        cumulative=yes
        value=42
        [filter]
			[filter_adjacent]
				adjacent=n,ne,se,s,sw,nw
				count=6
				is_enemy=no
				[has_attack]
				    type=fire
				[/has_attack]
			[/filter_adjacent]
		[/filter]
    [/leadership]
	[leadership]
        id=pyrokinesis_gui
        name= _ "pyrokinesis"
        female_name= _ "female^pyrokinesis"
		name_inactive= _ "pyrokinesis"
		description= _ "Every adjacent unit with a fire attack increases this unit's damage by 7%."
        affect_self=yes
        affect_allies=no
        cumulative=yes
        value=0
        [filter]
			[filter_adjacent]
				adjacent=n,ne,se,s,sw,nw
				count=1-6
				is_enemy=no
				[has_attack]
				    type=fire
				[/has_attack]
			[/filter_adjacent]
		[/filter]
    [/leadership]
#enddef
#define WEAPON_SPECIAL_INCINERATE
    [damage]
        id=incinerate
        name= _ "incinerate"
        description= _ "When used offensively, this attack gains 50% damage."
        multiply=1.5
        active_on=offense
    [/damage]
#enddef


#textdomain wesnoth-Genesis

#define AMLA_HALFLING_FIGHTER_MELEE
    [advancement]
        max_times=-1
        description=_"increased melee damage"
        image="attacks/spear.png"
        id=amla_melee_halfling_fighter
		strict_amla=yes
        [effect]
            apply_to=attack
			range=melee
            increase_damage=1
			heal_full=yes
        [/effect]
        [effect]
            apply_to=max_experience
            increase=35%
        [/effect]
    [/advancement]
#enddef
#define AMLA_HALFLING_FIGHTER_RANGED
    [advancement]
        max_times=-1
        description=_"stronger ranged attacks"
        image="attacks/javelin-human.png"
        id=amla_ranged_halfling_fighter
		strict_amla=yes
        [effect]
            apply_to=attack
			name=mystic fire
            increase_damage=1
			heal_full=yes
        [/effect]
        [effect]
            apply_to=max_experience
            increase=35%
        [/effect]
    [/advancement]
#enddef
#define AMLA_HALFLING_FIGHTER_HITPOINTS
    [advancement]
        strict_amla=yes
        max_times=-1
        id=amla_default
        description= _ "increased hitpoints"
        image="icons/amla-default.png"
        [effect]
            apply_to=hitpoints
            increase_total=3
            heal_full=yes
        [/effect]
        [effect]
            apply_to=max_experience
            increase=50%
        [/effect]
        [effect]
            apply_to=status
            remove=poisoned
        [/effect]
        [effect]
            apply_to=status
            remove=slowed
        [/effect]
    [/advancement]
#enddef

#define WEAPON_SPECIAL_HARRY
    [slow]
        id=halfling_harry
        name= _ "harry"
        name_inactive= _ "harry"
        description= _ "This attack slows enemies under 50% life."
        description_inactive= _ "This attack slows enemies under 50% life."
        [filter_opponent]
            formula=self.(hitpoints<0.5*max_hitpoints)
        [/filter_opponent]
    [/slow]
#enddef

#define WEAPON_SPECIAL_IMPALE25
    [damage]
        id=halfling_impale25
        name= _ "impale"
        name_inactive= _ "impale"
        description= _ "This attack deals 25% bonus damage to slowed enemies."
        description_inactive= _ "This attack deals 25% bonus damage to slowed enemies."
        multiply=1.25
        [filter_opponent]
            status=slowed
        [/filter_opponent]
    [/damage]
#enddef

#define WEAPON_SPECIAL_IMPALE50
    [damage]
        id=halfling_impale50
        name= _ "impale"
        name_inactive= _ "impale"
        description= _ "This attack deals 50% bonus damage to slowed enemies."
        description_inactive= _ "This attack deals 50% bonus damage to slowed enemies."
        multiply=1.50
        [filter_opponent]
            status=slowed
        [/filter_opponent]
    [/damage]
#enddef

#define WEAPON_SPECIAL_DISTORT
    [chance_to_hit]
        id=halfling_distort
        name= _ "distort"
        description= _ "This attack has a 90% chance to hit if the enemy's attack type is fire, cold, or arcane."
        value=90
        cumulative=no
        [filter_opponent]
            [filter_weapon]
                type=fire,cold,arcane
            [/filter_weapon]
        [/filter_opponent]
    [/chance_to_hit]
#enddef

#define WEAPON_SPECIAL_CONTORT
    [damage]
        id=halfling_contort_reduce
        name= _ "contort"
        name_inactive= _ "contort"
        description= _ "This attack gains 30% damage on offense and drains "
        description_inactive= _ "Against fire, cold, and arcane attacks, this attack reduces damage by 30% and gains an equivalent amount of damage."
        apply_to=opponent
        multiply=0.7
    [/damage]
    [damage]
        id=halfling_contort_gain
        apply_to=self
        add=$($other_unit.
    [/damage]
#enddef


#textdomain wesnoth-Genesis

#define WEAPON_SPECIAL_DRAIN70
    [drains]
        id=drain70
        value=70
        name= _ "siphon"
        description= _ "This attack draws out small amounts of energy from the enemies it harms."
    [/drains]
#enddef

#define WEAPON_SPECIAL_DRAIN40
    [drains]
        id=drain40
        value=40
        name= _ "siphon"
        description= _ "This attack draws out small amounts of energy from the enemies it harms."
    [/drains]
#enddef

#define WEAPON_SPECIAL_DRAIN30
    [drains]
        id=drain30
        value=30
        name= _ "siphon"
        description= _ "This attack draws out small amounts of energy from the enemies it harms."
    [/drains]
#enddef
#define ABILITY_NIGHT_HUNTER
    [skirmisher]
        id=night_hunter_skirmish
        name= _ "night hunter"
        description= _ "This unit ignores enemy zones of control and gains an additional 30% damage at night."
        affect_self=yes
        [filter_self]
            [filter_location]
                time_of_day=chaotic
            [/filter_location]
        [/filter_self]
    [/skirmisher]
    [leadership]
        id=night_hunter_dmg
        value=30
        cumulative=yes
        affect_self=yes
        [filter_self]
            [filter_location]
                time_of_day=chaotic
            [/filter_location]
        [/filter_self]
    [/leadership]
#enddef
#define ABILITY_VOID_WARDEN
    [resistance]
        id=void_warden_resist
        add=10
        max_value=90
        name= _ "void warden"
        description= _ "This unit heals 6 HP and gains +10% to all resistances (up to 90%) at night."
        affect_self=yes
        affect_allies=no
        affect_enemies=no
        [filter_self]
            [filter_location]
                time_of_day=chaotic
            [/filter_location]
        [/filter_self]
    [/resistance]
    [regenerate]
        id=void_warden_regen
        value=6
        affect_self=yes
        [filter_self]
            [filter_location]
                time_of_day=chaotic
            [/filter_location]
        [/filter_self]
        poison=cured
    [/regenerate]
#enddef
#define ABILITY_CLARITY
    [resistance]
        id=clarity
        sub=10
        max_value=90
        apply_to=cold,arcane
        name= _ "clarity"
        female_name= _ "female^clarity"
        description= _ "This unit reduces nearby enemies' cold and arcane resistances by 10% at level 3, 20% at level 4, and 30% at level 5."
        affect_self=no
        affect_allies=no
        affect_enemies=yes
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
            [filter]
                [filter_adjacent]
                    ability=clarity
                    level=3
                [/filter_adjacent]
            [/filter]
        [/affect_adjacent]
    [/resistance]
    [resistance]
        id=clarity
        sub=20
        max_value=90
        apply_to=cold,arcane
        affect_self=no
        affect_allies=no
        affect_enemies=yes
        [affect_adjacent]
            adjacent=n,ne,se,s,sw,nw
            [filter]
                [filter_adjacent]
                    ability=clarity
                    level=4
                [/filter_adjacent]
            [/filter]
        [/affect_adjacent]
    [/resistance]
    [resistance]
        id=clarity
        sub=30
        max_value=90
        apply_to=cold,arcane
        affect_self=no
        affect_allies=no
        affect_enemies=yes
        [affect_adjacent]
            [filter]
                [filter_adjacent]
                    ability=clarity
                    level=5,6,7,8,9,10
                [/filter_adjacent]
            [/filter]
            adjacent=n,ne,se,s,sw,nw
        [/affect_adjacent]
    [/resistance]
#enddef
#define ABILITY_CLAIRVOYANCE
    [teleport]
        id=clairvoyance
        name= _ "clairvoyance"
        female_name= _ "female^clairvoyance"
        description= _ "This unit may teleport to allied units."
        [tunnel]
            id=clairvoyance
            [source]
                terrain=*
            [/source]
            [filter]
                ability=clairvoyance
            [/filter]
            [target]
                [filter_adjacent_location]
                    [filter]
                        side=$teleport_unit.side
                    [/filter]
                [/filter_adjacent_location]
            [/target]
        [/tunnel]
    [/teleport]
#enddef
#define WEAPON_SPECIAL_ECLIPSE
    [dummy]
        id=eclipse
        name= _ "eclipse"
        name_inactive= _ "eclipse"
        description= _ "This attack reduces the enemy's hitpoints by 50% prior to combat."
        description_inactive= _ "This attack reduces the enemy's hitpoints by 50% prior to combat."
    [/dummy]
#enddef
#define ECLIPSE WEAPON FACTOR
    [event]
        name=attack
        first_time_only=no
        [filter_attack]
            name={WEAPON}
            special=eclipse
        [/filter_attack]
        [store_unit]
            [filter]
                x,y=$x2,$y2
            [/filter]
            variable=opp
        [/store_unit]
        {VARIABLE obliterate $opp.hitpoints}
        {VARIABLE_OP obliterate divide {FACTOR}}
        [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=eclipse
        [/filter_second_attack]
        [store_unit]
            [filter]
                x,y=$x1,$y1
            [/filter]
            variable=opp
        [/store_unit]
        {VARIABLE obliterate opp.hitpoints}
        {VARIABLE_OP obliterate divide {FACTOR}}
        [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


#textdomain wesnoth-Genesis

#define TRAIT_SYLVAN
    [trait]
        id=sylvan
        availability="musthave"
        male_name= _ "sylvan"
        female_name= _ "female^sylvan"
        description= _ "Immune to poison and plague"
        [effect]
            apply_to=status
            add=unpoisonable
        [/effect]
        [effect]
            apply_to=status
            add=unplagueable
        [/effect]
    [/trait]
#enddef

    [race]
        id=fae
        male_name= _ "race^Fae"
        female_name= _ "race+female^Fae"
        plural_name= _ "race^Fae"
        description= _"What is a Fae? Physically, the vast majority of these mysterious beings closely resemble the faerie peoples, and superficially, it is often impossible to tell the two apart. Fae are typically masters of mysticism and deception, allowing them to reside alongside their supposed kin usually without question.

What separates the Fae from other creatures is that, they are not possessed of true flesh and blood; they are inherently magical creatures, capable of generating great energy from within themselves, rather than channeling the energies of the natural forces around them. It may appear that a Fae will bleed when cut and weaken when wounded, but this is a facade kept by the Fae in order to hide their identities. Most Fae are also highly resilient to magical attacks, depending on which element they have the most affinity to.

Although they number extremely few, each Fae is a highly powerful being capable of great destruction. Possessed of enormous power, and utterly unpredictable, the Fae are often feared and shunned by mortal races, or sought after by the Guardians for their abilities. Fear of the Guardians and an inability to coexist with mortals (except when under the guise of their magics) usually drives the Fae to remain aloof."
        num_traits=0
        markov_chain_size=2
        {TRAIT_SYLVAN}
    [/race]
#define FAE_MOVE
    [movement_costs]
        deep_water=1
        shallow_water=1
        reef=1
        swamp_water=1
        flat=1
        sand=1
        forest=1
        hills=1
        mountains=1
        village=1
        castle=1
        cave=1
        frozen=1
        fungus=1
        unwalkable=1
    [/movement_costs]
#enddef

[movetype]
    name=guardian
    flying=yes
    {FAE_MOVE}
    [defense]
        deep_water=50
        shallow_water=50
        reef=50
        swamp_water=50
        flat=50
        sand=50
        forest=30
        hills=40
        mountains=30
        village=30
        castle=30
        cave=50
        unwalkable=60
        impassable=60
        frozen=50
        fungus=50
    [/defense]
    [resistance]
        blade=100
        pierce=100
        impact=100
        fire=100
        cold=100
        arcane=50
    [/resistance]
[/movetype]

#{~add-ons/Genesis/units/fae}
{~add-ons/Genesis/units/guardians}


#textdomain wesnoth-Genesis

[race]
    id=faerie
    female_name= _ "race^Faerie"
    male_name= _ "race+male^Faerie"
    plural_name= _ "race^Faeries"
    description= _ "Of all the races, the faerie were the second to be made at the start of Creation. Supposedly, these mystical beings were created in the likeness of the Guardian Xia'el and many inherited powers similar to hers: faerie show a deep connection to the earth and arcane, among other elements. It is for this reason that on Irdya alone, the faerie are the dominant race, and there exist no demons at all.

	The distinct physical characteristics of the faerie make them easy to identify; even among all the different types, the wings and beauty of form are always evident. It is also typical to find faerie in natural settings, usually in deep forests, where they can commune with nature and where they are closest to the powers that birthed them. By nature, most faerie tend to be caring and observant, though sometimes mischievous in nature. Certainly, they can be somewhat aloof to lesser races, and especially to demons, whom they tend to view as the forces of destruction in the universe. Faerie usually show a deep connection to life-giving powers, and although they cannot create life on their own, they foster and nurture it, although their relatively high magical powers can just as easily destroy it as well. However, faerie are typically pacifistic and will not attack unless heavily provoked, much unlike the demons.

	It is worth noting that faeries, while showing an innate affinity to magic, are still very much physical creatures: they are limited in their bodies, just like the other races. The abilities of a faerie heavily depends on the physical flesh. It is the soul that is tied to the physical body, and not the other way around; in other words, while wounds can be healed, regeneration is a different matter altogether. Physical strength is not common among faerie, though relative to lesser races like humans, the faerie can be deceptively strong. However, their greater physical abilities lie in endurance and agility, which they use to great advantage to outmaneuver their opponents, especially in the shadowed forests that they inhabit."
    num_traits=2
    ignore_global_traits=yes
    {TRAIT_QUICK}
    {TRAIT_INTELLIGENT}
    {TRAIT_RESILIENT}
	{TRAIT_DEXTROUS}
    markov_chain_size=3
    {ELVISH_NAMES}
    undead_variation=null
[/race]

    [movetype]
        name=faerie
        flies=yes
        [movement_costs]
            deep_water=2
            shallow_water=1
            reef=1
            swamp_water=1
            flat=1
            sand=1
            forest=1
            hills=1
            mountains=2
            village=1
            castle=1
            cave=1
            frozen=1
            fungus=1
        [/movement_costs]
        [defense]
            deep_water=60
            shallow_water=60
            reef=50
            swamp_water=60
            flat=50
            sand=60
            forest=40
            hills=50
            mountains=40
            village=40
            castle=40
            cave=60
            frozen=60
            fungus=50
        [/defense]
        [resistance]
            fire=90
            cold=90
            arcane=80
            blade=100
            pierce=100
            impact=100
        [/resistance]
    [/movetype]
    [movetype]
        name=yousei
        flies=yes
        [movement_costs]
            deep_water=2
            shallow_water=2
            reef=1
            swamp_water=1
            flat=1
            sand=1
            forest=1
            hills=1
            mountains=2
            village=1
            castle=1
            cave=2
            frozen=1
            fungus=1
        [/movement_costs]
        [defense]
            deep_water=70
            shallow_water=70
            reef=60
            swamp_water=60
            flat=50
            sand=60
            forest=40
            hills=50
            mountains=40
            village=40
            castle=40
            cave=60
            frozen=60
            fungus=50
        [/defense]
        [resistance]
            fire=100
            cold=100
            arcane=100
            blade=90
            pierce=90
            impact=90
        [/resistance]
    [/movetype]

#{~add-ons/Genesis/units/faeries}


#textdomain wesnoth-Genesis

{~add-ons/Genesis/units/fake}


#textdomain wesnoth-After_the_Storm

[race]
    id=imps
    male_name= _ "race^Imp"
    female_name= _ "race+female^Imp"
    plural_name= _ "race^Imps"
    description= _ "Lesser demons are frequently and incorrectly classified in a separate group of their own. Although they generally lack the magic abilities and intellectual power of their better known relatives, their numbers and raw strength usually suffice to compensate."
    {DEMON_NAMES}
    num_traits=2
    ignore_global_traits=yes
    undead_variation=null
    {TRAIT_STRONG}
    {TRAIT_QUICK}
    {TRAIT_RESILIENT}
    {TRAIT_WEAK}
    {TRAIT_SLOW}
    {TRAIT_DIM}
[/race]

[movetype]
    name=impfoot
    [movement_costs]
        deep_water={UNREACHABLE}
        shallow_water=2
        reef=2
        swamp_water=2
        flat=1
        sand=2
        forest=2
        hills=2
        mountains=3
        village=1
        castle=1
        cave=2
        unwalkable={UNREACHABLE}
        impassable={UNREACHABLE}
        frozen=3
        fungus=2
    [/movement_costs]
    [defense]
        deep_water=70
        shallow_water=70
        reef=60
        swamp_water=60
        flat=50
        sand=50
        forest=30
        hills=40
        mountains=30
        village=30
        castle=30
        cave=40
        unwalkable=50
        impassable=90
        frozen=70
        fungus=30
    [/defense]
    [resistance]
        blade=100
        pierce=100
        impact=100
        fire=100
        cold=110
        arcane=110
    [/resistance]
[/movetype]

{~add-ons/Genesis/units/imps}


#textdomain wesnoth-After_the_Storm

[movetype]
    name=houndfoot
    [movement_costs]
        deep_water={UNREACHABLE}
        shallow_water=2
        swamp_water=2
        reef=2
        flat=1
        sand=2
        forest=2
        hills=2
        mountains=3
        village=1
        castle=1
        cave=3
        unwalkable={UNREACHABLE}
        impassable={UNREACHABLE}
        frozen=2
        fungus=2
    [/movement_costs]
    [defense]
        deep_water=80
        shallow_water=80
        swamp_water=70
        reef=70
        flat=70
        sand=70
        forest=50
        hills=60
        mountains=50
        village=60
        castle=50
        cave=70
        unwalkable=50
        impassable=90
        frozen=80
        fungus=50
    [/defense]
    [resistance]
        blade=100
        pierce=110
        impact=100
        fire=100
        cold=100
        arcane=110
    [/resistance]
[/movetype]

{~add-ons/Genesis/units/monsters}


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Galerunner
    name= _ "Galerunner"
    race=demon
    gender=male,female
    image="units/demons-other/galerunner.png"
    hitpoints=46
    movement_type=demonfly
    movement=10
    experience=150
    level=3
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=60
    usage=scout
    [abilities]
        {ABILITY_SKIRMISHER}
    [/abilities]
    description= _ "With extensive training, demons that focus most of their strength into their wings gain vastly improved maneuverability. The force of their wings can produce surprisingly powerful blasts of wind in unrelenting streams, while their speed allows them to strike first when engaging in melee combat. The combination of these abilities provides a potent tool for these demons to hunt down and kill isolated targets, allowing them to excel in skirmishes."
    {DEFENSE_ANIM "units/demons-other/galerunner.png" "units/demons-other/galerunner.png" {SOUND_LIST:HUMAN_HIT} }
    die_sound={SOUND_LIST:HUMAN_DIE}
    [attack]
        name=claws
        description=_"claws"
        icon=attacks/claws-undead.png
        type=blade
        range=melee
        damage=7
        number=4
        [specials]
            {WEAPON_SPECIAL_FIRSTSTRIKE}
        [/specials]
    [/attack]
    [attack]
        name=gale force
        description=_"gale force"
        icon=attacks/faerie-fire.png
        type=impact
        range=ranged
        damage=6
        number=7
        [specials]
            {WEAPON_SPECIAL_MARKSMAN}
        [/specials]
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                #image="units/demons-other/demon-winged-attack1.png"
                image="units/demons-other/galerunner.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                #image="units/demons-other/demon-winged-attack1.png"
                image="units/demons-other/galerunner.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=200
            #image="units/demons-other/demon-winged-attack2.png"
            image="units/demons-other/galerunner.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=gale force
        [/filter_attack]
        {MISSILE_FRAME_FAERIE_FIRE}
        start_time=-450
        {SOUND:HIT_AND_MISS gust.wav gust.wav -450}
        [frame]
            image="units/demons-other/galerunner.png"
        [/frame]
    [/attack_anim]

    [female]
        name= _ "female^Galerunner"
        gender=female
        image="units/demons-other/galerunner-female.png"
        {DEFENSE_ANIM "units/demons-other/galerunner-female.png" "units/demons-other/galerunner-female.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
        die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}
        [attack_anim]
            [filter_attack]
                name=claws
            [/filter_attack]
            [if]
                [frame]
                    #image="units/demons-other/demon-winged+female-attack1.png"
                    image="units/demons-other/galerunner-female.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    #image="units/demons-other/demon-winged+female-attack1.png"
                    image="units/demons-other/galerunner-female.png"
                [/frame]
            [/else]
            [frame]
                #image="units/demons-other/demon-winged+female-attack2.png"
                image="units/demons-other/galerunner-female.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=gale force
            [/filter_attack]
            [frame]
                image="units/demons-other/galerunner-female.png"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Stormbringer
    name= _ "Stormbringer"
    race=demon
    gender=male,female
    image="units/demons-other/stormbringer.png"
    hitpoints=54
    movement_type=demonfly
    movement=7
    experience=150
    level=3
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=56
    usage=scout
    [abilities]
        {ABILITY_SKIRMISHER}
    [/abilities]
    description= _ "Often the harbingers of greater forces, 'Stormbringers' are usually used as the initial strike force in heavy assaults. Their abilities are well-suited to this task: fire, by its very nature, is more powerful used on the offensive, and the Stormbringers' mastery of it allows them to greatly weaken opposing armies before their other brethren arrive. In melee combat, their natural agility combined with the increased mobility from their wings allows them to use their claws to maximum effect, enough to slash straight through flesh and bone with ease."
    {DEFENSE_ANIM "units/demons-other/stormbringer.png" "units/demons-other/stormbringer.png" {SOUND_LIST:HUMAN_HIT} }
    die_sound={SOUND_LIST:HUMAN_DIE}
    [resistance]
        fire=70
    [/resistance]
    [attack]
        name=claws
        description= _ "claws"
        icon=attacks/claws-flaming.png
        type=blade
        range=melee
        damage=9
        number=3
    [/attack]
    [attack]
        name=storm
        description= _ "storm"
        icon=attacks/fireball.png
        type=fire
        range=ranged
        damage=12
        number=3
        [specials]
            {WEAPON_SPECIAL_BLAZE}
            {WEAPON_SPECIAL_FIRSTSTRIKE}
        [/specials]
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                #image="units/demons-other/demon-winged-attack1.png"
                image="units/demons-other/stormbringer.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                #image="units/demons-other/demon-winged-attack1.png"
                image="units/demons-other/stormbringer.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=200
            #image="units/demons-other/demon-winged-attack2.png"
            image="units/demons-other/stormbringer.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=storm
        [/filter_attack]
        {MISSILE_FRAME_FIREBALL_XY -11 20}
        [frame]
            begin=-250
            end=-175
            #image="units/demons-other/demon-winged-range1.png"
            image="units/demons-other/stormbringer.png"
        [/frame]
        [frame]
            begin=-175
            end=-50
            #image="units/demons-other/demon-winged-range1.png"
            image="units/demons-other/stormbringer.png"
            sound=fire.wav
        [/frame]
        [frame]
            begin=-50
            end=50
            #image="units/demons-other/demon-winged-range2.png"
            image="units/demons-other/stormbringer.png"
        [/frame]
        [frame]
            begin=50
            end=100
            #image="units/demons-other/demon-winged-range3.png"
            image="units/demons-other/stormbringer.png"
        [/frame]
    [/attack_anim]

    [female]
        name= _ "female^Stormbringer"
        gender=female
        image="units/demons-other/stormbringer-female.png"
        {DEFENSE_ANIM "units/demons-other/stormbringer-female.png" "units/demons-other/stormbringer-female.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
        die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}
        [attack_anim]
            [filter_attack]
                name=claws
            [/filter_attack]
            [if]
                [frame]
                    #image="units/demons-other/demon-winged+female-attack1.png"
                    image="units/demons-other/stormbringer-female.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    #image="units/demons-other/demon-winged+female-attack1.png"
                    image="units/demons-other/stormbringer-female.png"
                [/frame]
            [/else]
            [frame]
                #image="units/demons-other/demon-winged+female-attack2.png"
                image="units/demons-other/stormbringer-female.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=storm
            [/filter_attack]
            [frame]
                #image="units/demons-other/demon-winged+female-range1.png"
                image="units/demons-other/stormbringer-female.png"
            [/frame]
            [frame]
                #image="units/demons-other/demon-winged+female-range1.png"
                image="units/demons-other/stormbringer-female.png"
            [/frame]
            [frame]
                #image="units/demons-other/demon-winged+female-range2.png"
                image="units/demons-other/stormbringer-female.png"
            [/frame]
            [frame]
                #image="units/demons-other/demon-winged+female-range3.png"
                image="units/demons-other/stormbringer-female.png"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Windlasher
    name= _ "Windlasher"
    race=demon
    gender=male,female
    image="units/demons-other/windlasher.png"
    hitpoints=36
    movement_type=demonfly
    movement=8
    experience=100
    level=2
    alignment=chaotic
    advances_to=Demon Galerunner
    cost=27
    usage=scout
    [abilities]
        {ABILITY_SKIRMISHER}
    [/abilities]
    description= _ "With training, a demon's wings can become surprisingly strong and can serve as a weapon in of themselves. By focusing their inner power into their wings some demons gain the ability to create powerful blasts of air in place of the usual fire that their kin produce. The increased strength in their wings also allows them to fly further and faster, making them both excellent skirmishers and scouts."
    {DEFENSE_ANIM "units/demons-other/windlasher.png" "units/demons-other/windlasher.png" {SOUND_LIST:HUMAN_HIT} }
    die_sound={SOUND_LIST:HUMAN_DIE}
    [attack]
        name=claws
        description= _ "claws"
        icon=attacks/claws-undead.png
        type=blade
        range=melee
        damage=6
        number=3
    [/attack]
    [attack]
        name=wind lash
        description=_"wind lash"
        icon=attacks/faerie-fire.png
        type=impact
        range=ranged
        damage=5
        number=6
        [specials]
            {WEAPON_SPECIAL_MARKSMAN}
        [/specials]
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                #image="units/demons-other/demon-winged-attack1.png"
                image="units/demons-other/windlasher.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                #image="units/demons-other/demon-winged-attack1.png"
                image="units/demons-other/windlasher.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=200
            #image="units/demons-other/demon-winged-attack2.png"
            image="units/demons-other/windlasher.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=wind lash
        [/filter_attack]
        {MISSILE_FRAME_FAERIE_FIRE}
        start_time=-450
        {SOUND:HIT_AND_MISS gust.wav gust.wav -450}
        [frame]
            image="units/demons-other/windlasher.png"
        [/frame]
    [/attack_anim]

    [female]
        name= _ "female^Windlasher"
        gender=female
        image="units/demons-other/windlasher-female.png"
        {DEFENSE_ANIM "units/demons-other/windlasher-female.png" "units/demons-other/windlasher-female.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
        die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}
        [attack_anim]
            [filter_attack]
                name=claws
            [/filter_attack]
            [if]
                [frame]
                    #image="units/demons-other/demon-winged+female-attack1.png"
                    image="units/demons-other/windlasher-female.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    #image="units/demons-other/demon-winged+female-attack1.png"
                    image="units/demons-other/windlasher-female.png"
                [/frame]
            [/else]
            [frame]
                #image="units/demons-other/demon-winged+female-attack2.png"
                image="units/demons-other/windlasher-female.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=wind lash
            [/filter_attack]
            [frame]
                image="units/demons-other/windlasher-female.png"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Winged Demon
    name= _ "Winged Demon"
    race=demon
    gender=male,female
    image="units/demons-other/winged.png"
    hitpoints=28
    movement_type=demonfly
    movement=6
    experience=35
    level=1
    alignment=chaotic
    advances_to=Demon Zephyr, Demon Windlasher
    cost=14
    usage=scout
    description= _ "Some demons go through a different maturing process and grow large webbed wings, which allow them to use their enormous strength to fly across great distances. As weapons and armor could only hinder them in flight, they must rely on their species’ strong build, long and sharp claws, and their limited control of fire to strike at their prey from above."
    {DEFENSE_ANIM "units/demons-other/winged.png" "units/demons-other/winged.png" {SOUND_LIST:HUMAN_HIT} }
    die_sound={SOUND_LIST:HUMAN_DIE}
    [resistance]
        fire=90
    [/resistance]
    [attack]
        name=claws
        description= _ "claws"
        icon=attacks/claws-flaming.png
        type=blade
        range=melee
        damage=5
        number=3
    [/attack]
    [attack]
        name=fireball
        description= _ "fireball"
        icon=attacks/fireball.png
        type=fire
        range=ranged
        damage=5
        number=3
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                #image="units/demons-other/demon-winged-attack1.png"
                image="units/demons-other/winged.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                #image="units/demons-other/demon-winged-attack1.png"
                image="units/demons-other/winged.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=200
            #image="units/demons-other/demon-winged-attack2.png"
            image="units/demons-other/winged.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=fireball
        [/filter_attack]
        {MISSILE_FRAME_FIREBALL_XY -11 20}
        [frame]
            begin=-250
            end=-175
            #image="units/demons-other/demon-winged-range1.png"
            image="units/demons-other/winged.png"
        [/frame]
        [frame]
            begin=-175
            end=-50
            #image="units/demons-other/demon-winged-range1.png"
            image="units/demons-other/winged.png"
            sound=fire.wav
        [/frame]
        [frame]
            begin=-50
            end=50
            #image="units/demons-other/demon-winged-range2.png"
            image="units/demons-other/winged.png"
        [/frame]
        [frame]
            begin=50
            end=100
            #image="units/demons-other/demon-winged-range3.png"
            image="units/demons-other/winged.png"
        [/frame]
    [/attack_anim]

    [female]
        name= _ "female^Winged Demon"
        gender=female
        image="units/demons-other/winged-female.png"
        {DEFENSE_ANIM "units/demons-other/winged-female.png" "units/demons-other/winged-female.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
        die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}
        [attack_anim]
            [filter_attack]
                name=claws
            [/filter_attack]
            [if]
                [frame]
                    #image="units/demons-other/demon-winged+female-attack1.png"
                    image="units/demons-other/winged-female.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    #image="units/demons-other/demon-winged+female-attack1.png"
                    image="units/demons-other/winged-female.png"
                [/frame]
            [/else]
            [frame]
                #image="units/demons-other/demon-winged+female-attack2.png"
                image="units/demons-other/winged-female.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=fireball
            [/filter_attack]
            [frame]
                #image="units/demons-other/demon-winged+female-range1.png"
                image="units/demons-other/winged-female.png"
            [/frame]
            [frame]
                #image="units/demons-other/demon-winged+female-range1.png"
                image="units/demons-other/winged-female.png"
            [/frame]
            [frame]
                #image="units/demons-other/demon-winged+female-range2.png"
                image="units/demons-other/winged-female.png"
            [/frame]
            [frame]
                #image="units/demons-other/demon-winged+female-range3.png"
                image="units/demons-other/winged-female.png"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Zephyr
    name= _ "Demon Zephyr"
    race=demon
    gender=male,female
    image="units/demons-other/zephyr.png"
    hitpoints=41
    movement_type=demonfly
    movement=7
    experience=90
    level=2
    alignment=chaotic
    advances_to=Demon Stormbringer
    cost=27
    usage=scout
    [abilities]
        {ABILITY_SKIRMISHER}
    [/abilities]
    description= _ "As demons grow acclimated to their wings, they learn to use the increased mobility and height to their advantage. Though they do not necessarily grow physically stronger, the momentum from flight allows for increased force when slashing with their claws, and the leverage from the air allows them to gauge the weak points in an enemy's defense where their fireballs can do more damage."
    {DEFENSE_ANIM "units/demons-other/zephyr.png" "units/demons-other/zephyr.png" {SOUND_LIST:HUMAN_HIT} }
    die_sound={SOUND_LIST:HUMAN_DIE}
    [resistance]
        fire=80
    [/resistance]
    [attack]
        name=claws
        description= _ "claws"
        icon=attacks/claws-flaming.png
        type=blade
        range=melee
        damage=7
        number=3
    [/attack]
    [attack]
        name=fireball
        description= _ "fireball"
        icon=attacks/fireball.png
        type=fire
        range=ranged
        damage=9
        number=3
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                #image="units/demons-other/demon-winged-attack1.png"
                image="units/demons-other/zephyr.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                #image="units/demons-other/demon-winged-attack1.png"
                image="units/demons-other/zephyr.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=200
            #image="units/demons-other/demon-winged-attack2.png"
            image="units/demons-other/zephyr.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=fireball
        [/filter_attack]
        {MISSILE_FRAME_FIREBALL_XY -11 20}
        [frame]
            begin=-250
            end=-175
            #image="units/demons-other/demon-winged-range1.png"
            image="units/demons-other/zephyr.png"
        [/frame]
        [frame]
            begin=-175
            end=-50
            #image="units/demons-other/demon-winged-range1.png"
            image="units/demons-other/zephyr.png"
            sound=fire.wav
        [/frame]
        [frame]
            begin=-50
            end=50
            #image="units/demons-other/demon-winged-range2.png"
            image="units/demons-other/zephyr.png"
        [/frame]
        [frame]
            begin=50
            end=100
            #image="units/demons-other/demon-winged-range3.png"
            image="units/demons-other/zephyr.png"
        [/frame]
    [/attack_anim]

    [female]
        name= _ "female^Demoness Zephyr"
        gender=female
        image="units/demons-other/zephyr+female.png"
        {DEFENSE_ANIM "units/demons-other/zephyr+female.png" "units/demons-other/zephyr+female.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
        die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}
        [attack_anim]
            [filter_attack]
                name=claws
            [/filter_attack]
            [if]
                [frame]
                    #image="units/demons-other/demon-winged+female-attack1.png"
                    image="units/demons-other/zephyr+female.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    #image="units/demons-other/demon-winged+female-attack1.png"
                    image="units/demons-other/zephyr+female.png"
                [/frame]
            [/else]
            [frame]
                #image="units/demons-other/demon-winged+female-attack2.png"
                image="units/demons-other/zephyr+female.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=fireball
            [/filter_attack]
            [frame]
                #image="units/demons-other/demon-winged+female-range1.png"
                image="units/demons-other/zephyr+female.png"
            [/frame]
            [frame]
                #image="units/demons-other/demon-winged+female-range1.png"
                image="units/demons-other/zephyr+female.png"
            [/frame]
            [frame]
                #image="units/demons-other/demon-winged+female-range2.png"
                image="units/demons-other/zephyr+female.png"
            [/frame]
            [frame]
                #image="units/demons-other/demon-winged+female-range3.png"
                image="units/demons-other/zephyr+female.png"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Black Demon
    name= _ "Black Demon"
    race=demon
    gender=male,female
    image="units/demons/black/black-male.png"
    profile="portraits/demons/demon-black-male.png"
    hitpoints=33
    movement_type=demonfly
    movement=5
    experience=100
    level=2
    alignment=chaotic
    advances_to=Demon Voidhunter,Demon Voidreaver
    cost=31
    usage=mixed fighter
    description= _ "The area outside of the boundary of the universe is commonly referred to as the 'void', an empty space in which, it is supposed, no energy and life exists. Even brief exposure to the void corrupts the body and soul, sapping the life force of living beings and destroying their minds, no matter how powerful they are. Demons who have been touched by the void become creatures with immense destructive force, but warped minds and insatiable emptiness."
    {DEFENSE_ANIM "units/demons/black/black-male.png" "units/demons/black/black-male.png" {SOUND_LIST:HUMAN_HIT} }
    die_sound=lich-die.ogg
    [resistance]
        cold=70
        arcane=70
    [/resistance]
    [attack]
        name=claws
        description= _ "claws"
        icon=attacks/claws-flaming.png
        type=blade
        range=melee
        damage=10
        number=3
    [/attack]
    [attack]
        name=void essence
        description= _ "void essence"
        icon=attacks/fireball.png
        type=cold
        range=ranged
        damage=13
        number=3
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/demons/black/black-male.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/demons/black/black-male.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=200
            image="units/demons/black/black-male.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=void essence
        [/filter_attack]
        {MISSILE_FRAME_FIREBALL_XY -11 20}
        [frame]
            begin=-250
            end=-175
            image="units/demons/black/black-male.png"
        [/frame]
        [frame]
            begin=-175
            end=-50
            image="units/demons/black/black-male.png"
            sound=fire.wav
        [/frame]
        [frame]
            begin=-50
            end=50
            image="units/demons/black/black-male.png"
        [/frame]
        [frame]
            begin=50
            end=100
            image="units/demons/black/black-male.png"
        [/frame]
    [/attack_anim]

    [female]
        name= _ "female^Black Demoness"
        gender=female
        image="units/demons/black/black.png"
        profile="portraits/demons/demon-black.png"
        {DEFENSE_ANIM "units/demons/black/black.png" "units/demons/black/black.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
        die_sound=lich-die.ogg
        [attack_anim]
            [filter_attack]
                name=claws
            [/filter_attack]
            [if]
                [frame]
                    image="units/demons/black/black.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    image="units/demons/black/black.png"
                [/frame]
            [/else]
            [frame]
                image="units/demons/black/black.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=void essence
            [/filter_attack]
            [frame]
                image="units/demons/black/black.png"
            [/frame]
            [frame]
                image="units/demons/black/black.png"
            [/frame]
            [frame]
                image="units/demons/black/black.png"
            [/frame]
            [frame]
                image="units/demons/black/black.png"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Reaper
    name= _ "Reaper"
    race=demon
    gender=male,female
    image="units/demons/black/reaper-male.png"
    {TRAIT_UNDEAD}
    hitpoints=47
    movement_type=demonfly
    movement=9
    experience=200
    level=4
    bar_offset_x,bar_offset_y=0,0
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=96
    usage=scout
    description= _ "With enough time spent in the void, a demon eventually loses both its soul and its living qualities, becoming an embodiment of nothingness itself. Usually its body is consumed entirely along with its spirit, but in some cases the body remains and eventually finds its way out of the void. Like their lesser cousins, these demons no longer possess any sort of sentience and have only one instinct, to hunt and kill in the name of the void. However, these demons are additionally imparted with the ability to open rifts into the void, allowing them to reap the souls of those they have slain and sacrifice them to the darkness. And, on very rare occasions, if the reaped soul manages to withstand the void for a prolonged period, it, too, is transformed into a reaper whose only purpose is to feed more energy into the void."
    {DEFENSE_ANIM "units/demons/black/reaper-male.png" "units/demons/black/reaper-male.png" wail.wav }
    die_sound=lich-die.ogg
    [resistance]
        blade=70
        pierce=70
        impact=70
        fire=80
        cold=60
        arcane=60
    [/resistance]
    [movement_costs]
        mountains=1
        cave=1
        fungus=1
        impassable=9
    [/movement_costs]
    [attack]
        name=void scythe
        description=_"void scythe"
        icon=attacks/claws-undead.png
        type=blade
        range=melee
        damage=17
        number=3
        [specials]
            {WEAPON_SPECIAL_BACKSTAB}
        [/specials]
    [/attack]
    [attack]
        name=abyss
        description=_"abyss"
        icon=attacks/hellbent-tide.png
        type=arcane
        range=ranged
        damage=25
        number=1
        [specials]
            {WEAPON_SPECIAL_ABYSS}
        [/specials]
    [/attack]
    {ABEYANCE "abyss" 15}
    [attack_anim]
        [filter_attack]
            name=void scythe
        [/filter_attack]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/demons/black/reaper-male.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/demons/black/reaper-male.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=200
            image="units/demons/black/reaper-male.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=abyss
        [/filter_attack]
        {MISSILE_FRAME_FIREBALL_XY -11 20}
        [frame]
            begin=-250
            end=-175
            image="units/demons/black/reaper-male.png"
        [/frame]
        [frame]
            begin=-175
            end=-50
            image="units/demons/black/reaper-male.png"
            sound=fire.wav
        [/frame]
        [frame]
            begin=-50
            end=50
            image="units/demons/black/reaper-male.png"
        [/frame]
        [frame]
            begin=50
            end=100
            image="units/demons/black/reaper-male.png"
        [/frame]
    [/attack_anim]

    [female]
        name= _ "female^Reaper"
        gender=female
        image="units/demons/black/reaper.png"
        {DEFENSE_ANIM "units/demons/black/reaper.png" "units/demons/black/reaper.png" wail-sml.wav }
        die_sound=lich-die.ogg
        [attack_anim]
            [filter_attack]
                name=void scythe
            [/filter_attack]
            [if]
                [frame]
                    image="units/demons/black/reaper.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    image="units/demons/black/reaper.png"
                [/frame]
            [/else]
            [frame]
                image="units/demons/black/reaper.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=abyss
            [/filter_attack]
            [frame]
                image="units/demons/black/reaper.png"
            [/frame]
            [frame]
                image="units/demons/black/reaper.png"
            [/frame]
            [frame]
                image="units/demons/black/reaper.png"
            [/frame]
            [frame]
                image="units/demons/black/reaper.png"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Voidhunter
    name= _ "Voidhunter"
    race=demon
    gender=male,female
    image="units/demons/black/voidhunter-male.png"
    hitpoints=41
    movement_type=demonfly
    movement=7
    experience=300
    level=3
    alignment=chaotic
    advances_to=Demon Reaper
    cost=64
    usage=mixed fighter
    description= _ "Incursions into the void are not only limited by number, but also by duration. An extended visit to the void entails certain death for the vast majority of creatures; however, some demons who possess an affinity to the void are able to stay within it for long periods of time and are imparted with even more of its essence than other demons. As such, they become powerful creatures who absorb the void's energies into themselves, allowing them to channel its power directly to decompose their targets. Yet the toll this takes on their bodies is enormous, for no ordinary mind can handle the purity of oblivion, and repeated use leaves these demons with nothing but the instinct to hunt in a futile attempt to sate the emptiness that oblivion incurs."
    {DEFENSE_ANIM "units/demons/black/voidhunter-male.png" "units/demons/black/voidhunter-male.png" {SOUND_LIST:HUMAN_HIT} }
    die_sound=lich-die.ogg
    [resistance]
        blade=80
        pierce=80
        impact=90
        fire=90
        cold=70
        arcane=70
    [/resistance]
    [attack]
        name=nether blade
        description=_"nether blade"
        icon=attacks/claws-undead.png
        type=blade
        range=melee
        damage=14
        number=3
        [specials]
            {WEAPON_SPECIAL_BACKSTAB}
        [/specials]
    [/attack]
    [attack]
        name=oblivion
        description=_"oblivion"
        icon=attacks/fireball.png
        type=arcane
        range=ranged
        damage=20
        number=1
        [specials]
            {WEAPON_SPECIAL_OBLIVION}
        [/specials]
    [/attack]

    {ABEYANCE "oblivion" 10}
    [attack_anim]
        [filter_attack]
            name=nether blade
        [/filter_attack]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/demons/black/voidhunter-male.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/demons/black/voidhunter-male.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=200
            image="units/demons/black/voidhunter-male.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=oblivion
        [/filter_attack]
        {MISSILE_FRAME_FIREBALL_XY -11 20}
        [frame]
            begin=-250
            end=-175
            image="units/demons/black/voidhunter-male.png"
        [/frame]
        [frame]
            begin=-175
            end=-50
            image="units/demons/black/voidhunter-male.png"
            sound=fire.wav
        [/frame]
        [frame]
            begin=-50
            end=50
            image="units/demons/black/voidhunter-male.png"
        [/frame]
        [frame]
            begin=50
            end=100
            image="units/demons/black/voidhunter-male.png"
        [/frame]
    [/attack_anim]

    [female]
        name= _ "female^Voidhunter"
        gender=female
        image="units/demons/black/voidhunter.png"
        {DEFENSE_ANIM "units/demons/black/voidhunter.png" "units/demons/black/voidhunter.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
        die_sound=lich-die.ogg
        [attack_anim]
            [filter_attack]
                name=nether blade
            [/filter_attack]
            [if]
                [frame]
                    image="units/demons/black/voidhunter.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    image="units/demons/black/voidhunter.png"
                [/frame]
            [/else]
            [frame]
                image="units/demons/black/voidhunter.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=oblivion
            [/filter_attack]
            [frame]
                image="units/demons/black/voidhunter.png"
            [/frame]
            [frame]
                image="units/demons/black/voidhunter.png"
            [/frame]
            [frame]
                image="units/demons/black/voidhunter.png"
            [/frame]
            [frame]
                image="units/demons/black/voidhunter.png"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Voidreaver
    name= _ "Voidreaver"
    race=demon
    gender=male,female
    image="units/demons/black/voidreaver-male.png"
    hitpoints=43
    movement_type=demonfly
    movement=6
    experience=250
    level=3
    alignment=chaotic
    advances_to=Demon Voidwatcher
    cost=60
    usage=mixed fighter
    description= _ "It is rare for one who has gazed into the abyss to return for more, but there exist those demons who dare to brave the void repeatedly. The fewer that survive return with the ability to summon the basic essence of the void, imbuing them with even greater destructive force. However, in return, their minds are consumed by the darkness and they are left with only two basic instincts - the instinct to survive, and kill."
    {DEFENSE_ANIM "units/demons/black/voidreaver-male.png" "units/demons/black/voidreaver-male.png" {SOUND_LIST:HUMAN_HIT} }
    die_sound=lich-die.ogg
    [resistance]
        fire=70
        cold=50
        arcane=60
    [/resistance]
    [attack]
        name=claws
        description= _ "claws"
        icon=attacks/claws-flaming.png
        type=blade
        range=melee
        damage=11
        number=3
    [/attack]
    [attack]
        name=void essence
        description= _ "void essence"
        icon=attacks/fireball.png
        type=cold
        range=ranged
        damage=18
        number=3
        [specials]
            {WEAPON_SPECIAL_CHAOS}
        [/specials]
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/demons/black/voidreaver-male.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/demons/black/voidreaver-male.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=200
            image="units/demons/black/voidreaver-male.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=void essence
        [/filter_attack]
        {MISSILE_FRAME_FIREBALL_XY -11 20}
        [frame]
            begin=-250
            end=-175
            image="units/demons/black/voidreaver-male.png"
        [/frame]
        [frame]
            begin=-175
            end=-50
            image="units/demons/black/voidreaver-male.png"
            sound=fire.wav
        [/frame]
        [frame]
            begin=-50
            end=50
            image="units/demons/black/voidreaver-male.png"
        [/frame]
        [frame]
            begin=50
            end=100
            image="units/demons/black/voidreaver-male.png"
        [/frame]
    [/attack_anim]

    [female]
        name= _ "female^Voidreaver"
        gender=female
        image="units/demons/black/voidreaver.png"
        {DEFENSE_ANIM "units/demons/black/voidreaver.png" "units/demons/black/voidreaver.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
        die_sound=lich-die.ogg
        [attack_anim]
            [filter_attack]
                name=claws
            [/filter_attack]
            [if]
                [frame]
                    image="units/demons/black/voidreaver.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    image="units/demons/black/voidreaver.png"
                [/frame]
            [/else]
            [frame]
                image="units/demons/black/voidreaver.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=void essence
            [/filter_attack]
            [frame]
                image="units/demons/black/voidreaver.png"
            [/frame]
            [frame]
                image="units/demons/black/voidreaver.png"
            [/frame]
            [frame]
                image="units/demons/black/voidreaver.png"
            [/frame]
            [frame]
                image="units/demons/black/voidreaver.png"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Voidwatcher
    name= _ "Voidwatcher"
    race=demon
    gender=male,female
    {TRAIT_UNDEAD}
    image="units/demons/black/voidwatcher-male.png"
    hitpoints=53
    movement_type=demonfly
    movement=6
    experience=200
    level=4
    alignment=chaotic
    advances_to=null
    {TRAIT_SPIRIT}
    {AMLA_DEFAULT}
    cost=90
    usage=mixed fighter
    description= _ "With enough incursions into the void, a demon loses not only its mind, but also its soul, becoming a being trapped between life and death. Though their minds are already long withered away, their sheer instinct to survive and kill causes them to become agents of incredible destruction wrought by the void."
    {DEFENSE_ANIM "units/demons/black/voidwatcher-male.png" "units/demons/black/voidwatcher-male.png" wail.wav }
    die_sound=lich-die.ogg
    [resistance]
        fire=50
        cold=30
        arcane=50
    [/resistance]
    [attack]
        name=claws
        description=_"claws"
        icon=attacks/claws-undead.png
        type=blade
        range=melee
        damage=12
        number=3
    [/attack]
    [attack]
        name=vitiate
        description=_"vitiate"
        icon=attacks/fireball.png
        type=arcane
        range=ranged
        damage=13
        number=4
        [specials]
            {WEAPON_SPECIAL_DRAIN100}
        [/specials]
    [/attack]
    [attack]
        name=void blast
        description=_"void blast"
        icon=attacks/fireball.png
        type=cold
        range=ranged
        damage=23
        number=3
        [specials]
            {WEAPON_SPECIAL_CHAOS}
        [/specials]
    [/attack]
    [attack_anim]
        [filter_attack]
            name=claws
        [/filter_attack]
        [if]
            hits=yes
            [frame]
                begin=-100
                end=100
                image="units/demons/black/voidwatcher-male.png"
                sound=claws.ogg
            [/frame]
        [/if]
        [else]
            hits=no
            [frame]
                begin=-100
                end=100
                image="units/demons/black/voidwatcher-male.png"
                sound={SOUND_LIST:MISS}
            [/frame]
        [/else]
        [frame]
            begin=100
            end=200
            image="units/demons/black/voidwatcher-male.png"
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=vitiate,void blast
        [/filter_attack]
        {MISSILE_FRAME_FIREBALL_XY -11 20}
        [frame]
            begin=-250
            end=-175
            image="units/demons/black/voidwatcher-male.png"
        [/frame]
        [frame]
            begin=-175
            end=-50
            image="units/demons/black/voidwatcher-male.png"
            sound=fire.wav
        [/frame]
        [frame]
            begin=-50
            end=50
            image="units/demons/black/voidwatcher-male.png"
        [/frame]
        [frame]
            begin=50
            end=100
            image="units/demons/black/voidwatcher-male.png"
        [/frame]
    [/attack_anim]

    [female]
        name= _ "female^Voidwatcher"
        gender=female
        image="units/demons/black/voidwatcher.png"
        {DEFENSE_ANIM "units/demons/black/voidwatcher.png" "units/demons/black/voidwatcher.png" wail-sml.wav }
        die_sound=lich-die.ogg
        [attack_anim]
            [filter_attack]
                name=claws
            [/filter_attack]
            [if]
                [frame]
                    image="units/demons/black/voidwatcher.png"
                [/frame]
            [/if]
            [else]
                [frame]
                    image="units/demons/black/voidwatcher.png"
                [/frame]
            [/else]
            [frame]
                image="units/demons/black/voidwatcher.png"
            [/frame]
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=vitiate,void blast
            [/filter_attack]
            [frame]
                image="units/demons/black/voidwatcher.png"
            [/frame]
            [frame]
                image="units/demons/black/voidwatcher.png"
            [/frame]
            [frame]
                image="units/demons/black/voidwatcher.png"
            [/frame]
            [frame]
                image="units/demons/black/voidwatcher.png"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Berserker
    name= _ "Berserker"
    race=demon
    gender=male,female
    image="units/demons/fiend/berserker.png"
    profile="portraits/demons/demon-berserker.png"
    hitpoints=46
    movement_type=demonfoot
    movement=5
    experience=100
    level=2
    alignment=chaotic
    advances_to=Demon Hellion
    cost=36
    usage=archer
    description= _ "The acrobatic 'dance of embers' that these demons are renowned for relies on the use of their agility to skit around enemies while maintaining a constant stream of fire. This, of course, requires immense skill, for these demons must be able to both remain focused on dodging attacks and remaining just out of melee range, while still being able to release enough power to allow their flames to do any real damage."
    die_sound={SOUND_LIST:HUMAN_DIE}
    {DEFENSE_ANIM "units/demons/fiend/berserker-defend.png" "units/demons/fiend/berserker.png" {SOUND_LIST:HUMAN_HIT} }
    [attack]
        name=axe
        description= _ "axe"
        type=blade
        range=melee
        damage=10
        number=3
        icon=attacks/axe-undead.png
    [/attack]
    [attack]
        name=rage
        description= _ "rage"
        type=fire
        range=ranged
        damage=10
        number=3
        icon=attacks/fireball.png
        [specials]
            {WEAPON_SPECIAL_BERSERK}
        [/specials]
    [/attack]

    [attack_anim]
        [filter_attack]
            name=axe
        [/filter_attack]
        start_time=-325
        [frame]
            image="units/demons/fiend/berserker-melee[1~5].png:[125*2,75*2,100]"
        [/frame]
        [frame]
            image="units/demons/fiend/berserker-melee4.png:75"
        [/frame]
        [frame]
            image="units/demons/fiend/berserker-melee3.png:50"
        [/frame]
        {SOUND:HIT_AND_MISS {SOUND_LIST:SWORD_SWISH} {SOUND_LIST:MISS} -100}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=rage
        [/filter_attack]
        {MISSILE_FRAME_FIREBALL_XY -11 20}
        start_time=-450
        [frame]
            image="units/demons/fiend/berserker-ranged[1~2].png:[125,75]"
        [/frame]
        [frame]
            image="units/demons/fiend/berserker-ranged[3~4].png:75"
            sound=fire.wav
        [/frame]
        [frame]
            image="units/demons/fiend/berserker-ranged4.png:150"
        [/frame]
    [/attack_anim]

    [female]
        name= _ "female^Berserker"
        gender=female
        image="units/demons/fiend/berserker-female.png"
        profile="portraits/demons/demon-berserker-female.png"
        die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}
        {DEFENSE_ANIM "units/demons/fiend/berserker-female-defend.png" "units/demons/fiend/berserker-female.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
        [attack_anim]
            [filter_attack]
                name=axe
            [/filter_attack]
            start_time=-325
            [frame]
                image="units/demons/fiend/berserker-female-melee[1~5].png:[125*2,75*2,100]"
            [/frame]
            [frame]
                image="units/demons/fiend/berserker-female-melee4.png:75"
            [/frame]
            [frame]
                image="units/demons/fiend/berserker-female-melee3.png:50"
            [/frame]
            {SOUND:HIT_AND_MISS {SOUND_LIST:SWORD_SWISH} {SOUND_LIST:MISS} -100}
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=rage
            [/filter_attack]
            {MISSILE_FRAME_FIREBALL_XY -11 20}
            start_time=-450
            [frame]
                image="units/demons/fiend/berserker-female-ranged[1~2].png:[125,75]"
            [/frame]
            [frame]
                image="units/demons/fiend/berserker-female-ranged[3~4].png:75"
                sound=fire.wav
            [/frame]
            [frame]
                image="units/demons/fiend/berserker-female-ranged4.png:150"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]


#textdomain wesnoth-Genesis

[unit_type]
    id=Demon Fiend
    name= _ "Fiend"
    race=demon
    gender=male,female
    image="units/demons/fiend/fiend.png"
    profile="portraits/demons/demon-fiend.png"
    hitpoints=31
    movement_type=demonfoot
    movement=5
    experience=50
    level=1
    alignment=chaotic
    advances_to=Demon Berserker
    cost=19
    usage=archer
    description= _ "Although most Urdemons are not noted for being particularly savage, a select few make war their specialty and are capable of matching even the most brutal among other demon subspecies. Dubbed 'Fiends' by their enemies, the name refers to the disposition of these warriors on the battlefield, where they fight in a skillful, agile frenzy. Fighting unrelentingly without pause, these demons hurl an endless stream of fire at their enemies from just out of melee range, dancing gracefully through blade and shield as they cut a path through enemy lines."
    die_sound={SOUND_LIST:HUMAN_DIE}
    {DEFENSE_ANIM "units/demons/fiend/fiend-melee2.png" "units/demons/fiend/fiend.png" {SOUND_LIST:HUMAN_HIT} }
    [attack]
        name=axe
        description= _ "axe"
        icon="attacks/axe-deathblade.png"
        type=blade
        range=melee
        damage=6
        number=3
    [/attack]
    [attack]
        name=rage
        description= _ "rage"
        type=fire
        range=ranged
        damage=6
        number=3
        icon=attacks/fireball.png
        [specials]
            {WEAPON_SPECIAL_BERSERK}
        [/specials]
    [/attack]

    [attack_anim]
        [filter_attack]
            name=axe
        [/filter_attack]
        start_time=-325
        [frame]
            image="units/demons/fiend/fiend-melee[1~6].png:[125*2,75*2,150,100]"
        [/frame]
        {SOUND:HIT_AND_MISS {SOUND_LIST:SWORD_SWISH} {SOUND_LIST:MISS} -100}
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=rage
        [/filter_attack]
        {MISSILE_FRAME_FIREBALL_XY -11 20}
        start_time=-400
        [frame]
            image="units/demons/fiend/fiend-ranged[1~2].png:75"
        [/frame]
        [frame]
            image="units/demons/fiend/fiend-ranged[3~4].png:75"
            sound=fire.wav
        [/frame]
        [frame]
            image="units/demons/fiend/fiend-ranged4.png:150"
        [/frame]
    [/attack_anim]

    [female]
        name= _ "female^Fiend"
        gender=female
        image="units/demons/fiend/fiend-female.png"
        profile="portraits/demons/demon-fiend-female.png"
        die_sound={SOUND_LIST:HUMAN_FEMALE_DIE}
        {DEFENSE_ANIM "units/demons/fiend/fiend-female-melee2.png" "units/demons/fiend/fiend-female.png" {SOUND_LIST:HUMAN_FEMALE_HIT} }
        [attack_anim]
            [filter_attack]
                name=axe
            [/filter_attack]
            start_time=-325
        [frame]
            image="units/demons/fiend/fiend-female-melee[1~6].png:[125*2,75*2,150,100]"
        [/frame]
        {SOUND:HIT_AND_MISS {SOUND_LIST:SWORD_SWISH} {SOUND_LIST:MISS} -100}
        [/attack_anim]
        [attack_anim]
            [filter_attack]
                name=rage
            [/filter_attack]
            {MISSILE_FRAME_FIREBALL_XY -11 20}
            start_time=-400
            [frame]
                image="units/demons/fiend/fiend-female-ranged[1~2].png:75"
            [/frame]
            [frame]
                image="units/demons/fiend/fiend-female-ranged[3~4].png:75"
                sound=fire.wav
            [/frame]
            [frame]
                image="units/demons/fiend/fiend-female-ranged4.png:150"
            [/frame]
        [/attack_anim]
    [/female]
[/unit_type]