#textdomain wesnoth-units

# Common statistics plus variations of some values
#define UNIT_BODY_SOULLESS_STATS MOVTYPE_NAME MOVES_NUMBER HP_AMOUNT ATTACK_NAME ATTACK_ICON ATTACK_TYPE
    race=undead
    {TRAIT_FEARLESS_MUSTHAVE}
    level=1
    experience=50
    alignment=chaotic
    advances_to=null
    {AMLA_DEFAULT}
    cost=13
    usage=fighter
    description= _ "The technique of animating a dead body is unfortunately well-known in the dark arts; practitioners often use it to raise servants and soldiers from unwilling corpses. These shamblers are often numerous, but fragile; a touch of combat can waken them, though, making them far more formidable."
    die_sound={SOUND_LIST:ZOMBIE_WEAK_HIT}
    [resistance]
        arcane=140
    [/resistance]

    movement_type={MOVTYPE_NAME}
    movement={MOVES_NUMBER}
    hitpoints={HP_AMOUNT}

    # The human-looking hand in the attack icon doesn't work well for some races, so it's
    # changeable here. The animals have no hands at all, so they get fangs. The internal
    # name can't change from touch though.
    [attack]
        name=touch
        description={ATTACK_NAME}
        icon={ATTACK_ICON}
        range=melee
        type={ATTACK_TYPE}
        damage=7
        number=3
        [specials]
            {WEAPON_SPECIAL_SOTA_PLAGUE}
        [/specials]
    [/attack]
#enddef

# Variant animations for the Soulless
#define UNIT_BODY_SOULLESS_GRAPHICS BASE_NAME
    image="units/undead/{BASE_NAME}.png"
    {DEFENSE_ANIM "units/undead/{BASE_NAME}-defend.png" "units/undead/{BASE_NAME}.png" {SOUND_LIST:ZOMBIE_HIT} }
    [death]
        start_time=0
        [frame]
            image="units/undead/{BASE_NAME}-die-[1~4].png:150,units/undead/soulless-die-[5~10].png:150"
        [/frame]
    [/death]
    [attack_anim]
        [filter_attack]
            name=touch
        [/filter_attack]
        direction=s
        start_time=-200
        [frame]
            image="units/undead/{BASE_NAME}-attack-s.png:400"
            sound=zombie-attack.wav
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=touch
        [/filter_attack]
        direction=n
        start_time=-200
        [frame]
            image="units/undead/{BASE_NAME}-attack-n.png:400"
            sound=zombie-attack.wav
        [/frame]
    [/attack_anim]
    [attack_anim]
        [filter_attack]
            name=touch
        [/filter_attack]
        direction=se,sw,ne,nw
        start_time=-200
        [frame]
            image="units/undead/{BASE_NAME}-attack.png:400"
            sound=zombie-attack.wav
        [/frame]
    [/attack_anim]
#enddef

[unit_type]
    id=SotA Soulless_Human
    name= _ "Soulless"
    profile=portraits/undead/soulless.webp
    {UNIT_BODY_SOULLESS_STATS    smallfoot 4 28 ( _ "touch") "attacks/touch-zombie.png" impact}
    {UNIT_BODY_SOULLESS_GRAPHICS soulless}
    [movement_costs]
        deep_water=4
    [/movement_costs]
    [defense]
        deep_water=90
    [/defense]
[/unit_type]

[unit_type]
    id=SotA Soulless_Dwarf
    name= _ "Soulless"
    profile=portraits/undead/zombie-dwarf.webp
    {UNIT_BODY_SOULLESS_STATS    dwarvishfoot 3 33 ( _ "touch") "attacks/touch-zombie.png" impact}
    {UNIT_BODY_SOULLESS_GRAPHICS soulless-dwarf}
    [movement_costs]
        deep_water=3
    [/movement_costs]
    [defense]
        deep_water=90
    [/defense]
[/unit_type]

[unit_type]
    id=SotA Soulless_Goblin
    name= _ "Soulless"
    profile=portraits/undead/zombie-goblin.webp
    {UNIT_BODY_SOULLESS_STATS    smallfoot 4 23 ( _ "touch") "attacks/touch-zombie.png" impact}
    {UNIT_BODY_SOULLESS_GRAPHICS soulless-goblin}
    [movement_costs]
        deep_water=4
    [/movement_costs]
    [defense]
        deep_water=90
    [/defense]
[/unit_type]

[unit_type]
    id=SotA Soulless_Gryphon
    name= _ "Soulless"
    profile=portraits/undead/zombie-gryphon.webp
    {UNIT_BODY_SOULLESS_STATS    fly 5 33 ( _ "claws") "attacks/claws-animal.png" blade}
    {UNIT_BODY_SOULLESS_GRAPHICS soulless-gryphon}
    [movement_costs]
        deep_water=1
    [/movement_costs]
    [defense]
        mountains=40
        deep_water=50
    [/defense]
[/unit_type]

[unit_type]
    id=SotA Soulless_Mounted
    name= _ "Soulless"
    profile=portraits/undead/walking-corpse.webp
    {UNIT_BODY_SOULLESS_STATS    mounted 5 33 ( _ "touch") "attacks/touch-zombie.png" impact}
    {UNIT_BODY_SOULLESS_GRAPHICS soulless-mounted}
    [movement_costs]
        deep_water=4
    [/movement_costs]
    [defense]
        deep_water=90
    [/defense]
[/unit_type]

[unit_type]
    id=SotA Soulless_Saurian
    name= _ "Soulless"
    profile=portraits/undead/zombie-saurian.webp
    {UNIT_BODY_SOULLESS_STATS    lizard 4 25 ( _ "touch") "attacks/touch-zombie.png" impact}
    {UNIT_BODY_SOULLESS_GRAPHICS soulless-saurian}
    [movement_costs]
        deep_water=4
    [/movement_costs]
    [defense]
        deep_water=90
    [/defense]
[/unit_type]

[unit_type]
    id=SotA Soulless_Swimmer
    name= _ "Soulless"
    profile=portraits/undead/zombie-swimmer.webp
    {UNIT_BODY_SOULLESS_STATS    swimmer 4 28 ( _ "touch") "attacks/touch-zombie.png" impact}
    {UNIT_BODY_SOULLESS_GRAPHICS soulless-swimmer}
    [movement_costs]
        forest=4
        hills=4
    [/movement_costs]
    [defense]
        deep_water=50
    [/defense]
[/unit_type]

[unit_type]
    id=SotA Soulless_Troll
    name= _ "Soulless"
    profile=portraits/undead/zombie-troll.webp
    {UNIT_BODY_SOULLESS_STATS    largefoot 4 33 ( _ "touch") "attacks/touch-zombie.png" impact}
    {UNIT_BODY_SOULLESS_GRAPHICS soulless-troll}
    [movement_costs]
        deep_water=4
    [/movement_costs]
    [defense]
        deep_water=90
    [/defense]
[/unit_type]

[unit_type]
    id=SotA Soulless_Wose
    name= _ "Soulless"
    profile=portraits/undead/zombie-wose.webp
    {UNIT_BODY_SOULLESS_STATS    treefolk 3 40 ( _ "touch") "attacks/crush-wose.png" impact}
    {UNIT_BODY_SOULLESS_GRAPHICS soulless-wose}
    [movement_costs]
        deep_water=3
    [/movement_costs]
    [defense]
        deep_water=90
    [/defense]
[/unit_type]

[unit_type]
    id=SotA Soulless_Wolf
    name= _ "Soulless"
    profile=portraits/undead/zombie-wolf.webp
    {UNIT_BODY_SOULLESS_STATS orcishfoot 5 30 ( _ "fangs") "attacks/fangs-animal.png" blade}
    {UNIT_BODY_SOULLESS_GRAPHICS soulless-wolf}
    [movement_costs]
        deep_water=4
    [/movement_costs]
    [defense]
        deep_water=90
        village=50
    [/defense]
[/unit_type]

[unit_type]
    id=SotA Soulless_Wolf Rider
    name= _ "Soulless"
    profile=portraits/undead/zombie-goblin.webp
    {UNIT_BODY_SOULLESS_STATS orcishfoot 5 32 ( _ "touch") "attacks/touch-zombie.png" impact}
    {UNIT_BODY_SOULLESS_GRAPHICS soulless-wolf-rider}
    [movement_costs]
        deep_water=4
    [/movement_costs]
    [defense]
        deep_water=90
    [/defense]
[/unit_type]

[unit_type]
    id=SotA Soulless_Spider
    name= _ "Soulless"
    profile=portraits/undead/zombie-spider.webp
    {UNIT_BODY_SOULLESS_STATS dwarvishfoot 4 37 ( _ "fangs") "attacks/fangs-spider.png" blade}
    {UNIT_BODY_SOULLESS_GRAPHICS soulless-spider}
    [movement_costs]
        deep_water=4
    [/movement_costs]
    [defense]
        deep_water=90
        village=50
    [/defense]
[/unit_type]

[unit_type]
    id=SotA Soulless_Rat
    name= _ "Soulless"
    profile=portraits/undead/zombie-rat.webp
    {UNIT_BODY_SOULLESS_STATS rodentfoot 3 20 ( _ "bite") "attacks/fangs-rodent.png" blade}
    {UNIT_BODY_SOULLESS_GRAPHICS soulless-rat}
    [movement_costs]
        deep_water=3
    [/movement_costs]
    [defense]
        deep_water=90
    [/defense]
[/unit_type]

[unit_type]
    id=SotA Soulless_Bat
    name= _ "Soulless"
    profile=portraits/undead/zombie-bat.webp
    {UNIT_BODY_SOULLESS_STATS fly 5 24 ( _ "fangs") "attacks/fangs-animal.png" blade}
    image="units/undead/soulless-bat-se-3.png"
    die_sound="bat-flapping.wav"
    [movement_costs]
        cave=1
        fungus=1
        deep_water=1
    [/movement_costs]
    [defense]
        cave=50
        fungus=50
        deep_water=50
    [/defense]
    [resistance]
        cold=70
    [/resistance]

    [death]
        start_time=0
        [frame]
            image="units/undead/soulless-bat-die-[1~4].png:150,units/undead/soulless-die-[5~10].png:150"
        [/frame]
    [/death]
    [defend]
        start_time=-126
        [if]
            hits=miss
            offset=0.0~-0.15,-0.15~0.0
        [/if]
        [else]
            hits=hit
            hit_sound_start_time=-25
            [hit_sound_frame]
                sound={SOUND_LIST:ZOMBIE_WEAK_HIT}
            [/hit_sound_frame]
        [/else]
        [if]
            direction=s,sw,se
            [frame]
                image="units/undead/soulless-bat-se-[3,4,3].png:[1,250,1]"
            [/frame]
        [/if]
        [else]
            direction=n,nw,ne
            [frame]
                image="units/undead/soulless-bat-ne-[3,4,3].png:[1,250,1]"
            [/frame]
        [/else]
    [/defend]
    [standing_anim]
        direction=s,se,sw
        start_time=0
        [frame]
            image="units/undead/soulless-bat-se-[3~1,2~5,4].png:[50,60,80,60,50,60,80,60]"
        [/frame]
    [/standing_anim]
    [standing_anim]
        direction=n,ne,nw
        start_time=0
        [frame]
            image="units/undead/soulless-bat-ne-[3~1,2~5,4].png:[50,60,80,60,50,60,80,60]"
        [/frame]
    [/standing_anim]

    [attack_anim]
        [filter_attack]
            name=touch
        [/filter_attack]
        direction=s,se,sw
        offset=0.0~0.9:200,0.9~0.0:160
        start_time=-200
        [frame]
            image="units/undead/soulless-bat-se-[3,2].png:30"
        [/frame]
        [frame]
            image="units/undead/soulless-bat-se-1.png:30"
            sound=bat-flapping.wav
        [/frame]
        [frame]
            image="units/undead/soulless-bat-se-[2,3].png:30"
        [/frame]
        [frame]
            image="units/undead/soulless-bat-se-4.png:70"
            sound=zombie-attack.wav
        [/frame]
        [frame]
            image="units/undead/soulless-bat-se-[3,2,3].png:[50*2,40]"
        [/frame]
    [/attack_anim]

    [attack_anim]
        [filter_attack]
            name=touch
        [/filter_attack]
        direction=n,ne,nw
        offset=0.0~0.9:200,0.9~0.0:160
        start_time=-200
        [frame]
            image="units/undead/soulless-bat-ne-[3,2].png:30"
        [/frame]
        [frame]
            image="units/undead/soulless-bat-ne-1.png:30"
            sound=bat-flapping.wav
        [/frame]
        [frame]
            image="units/undead/soulless-bat-ne-[2,3].png:30"
        [/frame]
        [frame]
            image="units/undead/soulless-bat-ne-4.png:70"
            sound=zombie-attack.wav
        [/frame]
        [frame]
            image="units/undead/soulless-bat-ne-[3,2,3].png:[50*2,40]"
        [/frame]
    [/attack_anim]
[/unit_type]

[hide_help]
    type=Soulless
[/hide_help]

#undef UNIT_BODY_SOULLESS_STATS
#undef UNIT_BODY_SOULLESS_GRAPHICS
